# tensorflow::ops::ResizeArea Class Reference

# tensorflow::ops::ResizeArea

`#include <image_ops.h>`

Resize `images` to `size` using area interpolation.

## Summary

[Input](https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input) images can be of different types but output images are always float.

The range of pixel values for the output image might be slightly different from the range for the input image because of limited numerical precision. To guarantee an output range, for example `[0.0, 1.0]`, apply `tf.clip_by_value` to the output.

Each output pixel is computed by first transforming the pixel's footprint into the input tensor and then averaging the pixels that intersect the footprint. An input pixel's contribution to the average is weighted by the fraction of its area that intersects the footprint. This is the same as OpenCV's INTER_AREA.

Arguments:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- images: 4-D with shape `[batch, height, width, channels]`.
- size: = A 1-D int32 [Tensor](https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of 2 elements: `new_height, new_width`. The new size for the images.

<br />

Optional attributes (see `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/resize-area/attrs#structtensorflow_1_1ops_1_1_resize_area_1_1_attrs`):

- align_corners: If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.

<br />

Returns:

- `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: 4-D with shape `[batch, new_height, new_width, channels]`.

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1a48c3b130fbd05acaed9512549485f012(const ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input images, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input size)` ||
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1ac1b5d48c5c77399d5198780d905281d7(const ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input images, ::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input size, const https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/resize-area/attrs#structtensorflow_1_1ops_1_1_resize_area_1_1_attrs & attrs)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1a5cb2a40837fb9d975e2ca454469e5cac` | `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1a64b25c97b7028b2b4c93978f2e957ad4` | `::https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1abdc62a6906daefaa326cda016f8fbb0c() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1a6e7fba9df05a54b4e0de2d079fa03403() const ` | ` `` ` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1a15a700424a492dfe07a1777ddc6146bd() const ` | ` `` ` |

| ### Public static functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area_1ae8ffc21c407e98bddb149275984ed3cf(bool x)` | `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/resize-area/attrs#structtensorflow_1_1ops_1_1_resize_area_1_1_attrs` |

| ### Structs ||
|---|---|
| [tensorflow::ops::ResizeArea::Attrs](https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/resize-area/attrs) | Optional attribute setters for [ResizeArea](https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/resize-area#classtensorflow_1_1ops_1_1_resize_area). |

## Public attributes

### operation

```
Operation operation
```

### resized_images

```
::tensorflow::Output resized_images
```

## Public functions

### ResizeArea

```
 ResizeArea(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size
)
```

### ResizeArea

```
 ResizeArea(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size,
  const ResizeArea::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### AlignCorners

```
Attrs AlignCorners(
  bool x
)
```