# tensorflow::ops::SampleDistortedBoundingBox::Attrs

`#include <image_ops.h>`

Optional attribute setters for [SampleDistortedBoundingBox](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/sample-distorted-bounding-box#classtensorflow_1_1ops_1_1_sample_distorted_bounding_box).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a10fa9ed4bcc56bf19d120a96314d459f = Default_area_range()` | `gtl::ArraySlice< float >` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a5f94da07d6c4a62a9b3cbd0d6dde8e90 = Default_aspect_ratio_range()` | `gtl::ArraySlice< float >` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a1837a276fcc1de5e7b55d07d858b5f07 = 100` | `int64` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a77c354b0dea4c72fd36240d38597d6cd = 0.1f` | `float` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a23a9b203d607b14cb185c5b6673a4d68 = 0` | `int64` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1acbf4b2d65cb72b4194d1b019b1dd5f55 = 0` | `int64` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a47ec3773a7ebbb2de5f98e480b6ec441 = false` | `bool` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a257ad0daeac9027e5d07969fbbadaaf9(const gtl::ArraySlice< float > & x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs` The cropped area of the image must contain a fraction of the supplied image within this range. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1abd0d9435fb51a57125f07b7c1e62e044(const gtl::ArraySlice< float > & x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs` The cropped area of the image must have an aspect ratio = width / height within this range. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a034b461ec785997b27dfc07d1564cff6(int64 x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs` Number of attempts at generating a cropped region of the image of the specified constraints. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1afac93755afa1a142f5b274e1865e6383(float x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs` The cropped area of the image must contain at least this fraction of any bounding box supplied. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a8b49b8d1dd2eba77f1e133a8a632aa9e(int64 x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs` If either `seed` or `seed2` are set to non-zero, the random number generator is seeded by the given `seed`. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1aa93767e1d93eddea4f1df2d1936a1a7e(int64 x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs` A second seed to avoid seed collision. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a8ee810c28bbcf6321174142224218bc9(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs` Controls behavior if no bounding boxes supplied. |

## Public attributes

### area_range_

```
gtl::ArraySlice< float > tensorflow::ops::SampleDistortedBoundingBox::Attrs::area_range_ = Default_area_range()
```

### aspect_ratio_range_

```
gtl::ArraySlice< float > tensorflow::ops::SampleDistortedBoundingBox::Attrs::aspect_ratio_range_ = Default_aspect_ratio_range()
```

### max_attempts_

```
int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::max_attempts_ = 100
```

### min_object_covered_

```
float tensorflow::ops::SampleDistortedBoundingBox::Attrs::min_object_covered_ = 0.1f
```

### seed2_

```
int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed2_ = 0
```

### seed_

```
int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed_ = 0
```

### use_image_if_no_bounding_boxes_

```
bool tensorflow::ops::SampleDistortedBoundingBox::Attrs::use_image_if_no_bounding_boxes_ = false
```

## Public functions

### AreaRange

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AreaRange(
  const gtl::ArraySlice< float > & x
)
```
The cropped area of the image must contain a fraction of the supplied image within this range.

Defaults to \[0.05, 1\]

### AspectRatioRange

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AspectRatioRange(
  const gtl::ArraySlice< float > & x
)
```
The cropped area of the image must have an aspect ratio = width / height within this range.

Defaults to \[0.75, 1.33\]

### MaxAttempts

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MaxAttempts(
  int64 x
)
```
Number of attempts at generating a cropped region of the image of the specified constraints.

After `max_attempts` failures, return the entire image.

Defaults to 100

### MinObjectCovered

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MinObjectCovered(
  float x
)
```
The cropped area of the image must contain at least this fraction of any bounding box supplied.

The value of this parameter should be non-negative. In the case of 0, the cropped area does not need to overlap any of the bounding boxes supplied.

Defaults to 0.1

### Seed

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed(
  int64 x
)
```
If either `seed` or `seed2` are set to non-zero, the random number generator is seeded by the given `seed`.

Otherwise, it is seeded by a random seed.

Defaults to 0

### Seed2

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed2(
  int64 x
)
```
A second seed to avoid seed collision.

Defaults to 0

### UseImageIfNoBoundingBoxes

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::UseImageIfNoBoundingBoxes(
  bool x
)
```
Controls behavior if no bounding boxes supplied.

If true, assume an implicit bounding box covering the whole input. If false, raise an error.

Defaults to false