Ter uma questão? Conecte-se com a comunidade no Fórum TensorFlow

# tfa.image.dense_image_warp

Image warping using per-pixel flow vectors.

### Used in the notebooks

Used in the tutorials

Apply a non-linear warp to the image, where the warp is specified by a dense flow field of offset vectors that define the correspondences of pixel values in the output image back to locations in the source image. Specifically, the pixel value at `output[b, j, i, c]` is `images[b, j - flow[b, j, i, 0], i - flow[b, j, i, 1], c]`.

The locations specified by this formula do not necessarily map to an int index. Therefore, the pixel value is obtained by bilinear interpolation of the 4 nearest pixels around `(b, j - flow[b, j, i, 0], i - flow[b, j, i, 1])`. For locations outside of the image, we use the nearest pixel values at the image boundary.

`image` 4-D float `Tensor` with shape `[batch, height, width, channels]`.
`flow` A 4-D float `Tensor` with shape `[batch, height, width, 2]`.
`name` A name for the operation (optional).

Note that image and flow can be of type `tf.half`, `tf.float32`, or `tf.float64`, and do not necessarily have to be the same type.

A 4-D float `Tensor` with shape`[batch, height, width, channels]` and same type as input image.

`ValueError` if `height < 2` or `width < 2` or the inputs have the wrong number of dimensions.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Não contém as informações de que eu preciso" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Muito complicado / etapas demais" },{ "type": "thumb-down", "id": "outOfDate", "label":"Desatualizado" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Outro" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Fácil de entender" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Meu problema foi resolvido" },{ "type": "thumb-up", "id": "otherUp", "label":"Outro" }]