ImageFlip#

Functions#

NVCVStatus pvaImageFlipCreate(NVCVOperatorHandle *handle, NVCVImageRequirements *imageRequirements)

Constructs an instance of the ImageFlip operator.

NVCVStatus pvaImageFlipSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageHandle in, NVCVImageHandle out, PVAFlipDirection flipDirection)

Submits the ImageFlip operator to a CUDA stream.

NVCVStatus pvaImageFlipSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVImageHandle in, NVCVImageHandle out, PVAFlipDirection flipDirection)

Submits the ImageFlip operator to a cuPVA stream.

Functions#

NVCVStatus pvaImageFlipCreate(
NVCVOperatorHandle *handle,
NVCVImageRequirements *imageRequirements,
)#

Constructs an instance of the ImageFlip operator.

This operator flips an image horizontally, vertically, or both directions.

Limitations:

  • This operator is designed to support only grayscale images based on their gray levels.

  • Input image and output image should be of U8 type. This includes the following formats: NVCV_IMAGE_FORMAT_U8, NVCV_IMAGE_FORMAT_Y8 or NVCV_IMAGE_FORMAT_Y8_ER.

Input: Input image sizes and format are specified in imageRequirements.

Image Format

Allowed

U8

Yes

Y8

Yes

Y8_ER

Yes

Output: Output image has the same format and dimensions as the input image.

Image Format

Allowed

U8

Yes

Y8

Yes

Y8_ER

Yes

Input/Output Dependency:

Property

Input == Output

Format

Yes

Width

Yes

Height

Yes

Parameters

Parameters:
  • handle[out] Where the operator instance handle will be written to.

    • Must not be NULL.

  • imageRequirements[in] Pointer to the NVCVImageRequirements structure which contains image width, height and format information.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null or imageRequirements are invalid.

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus pvaImageFlipSubmit(
NVCVOperatorHandle handle,
cudaStream_t stream,
NVCVImageHandle in,
NVCVImageHandle out,
PVAFlipDirection flipDirection,
)#

Submits the ImageFlip operator to a CUDA stream.

Note

CUDA stream support requirements:

  • PVA SDK 2.7.0 or later

  • Jetpack 7 or later

  • DriveOS 7 or later

  • x86 Emulator is not supported

Parameters:
  • handle[in] Handle to the operator.

  • stream[in] Handle to a valid CUDA stream.

  • in[in] Input image handle.

  • out[out] Output image handle.

  • flipDirection[in] Direction of the flip operation.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null, images are invalid, or flipDirection is invalid.

  • NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus pvaImageFlipSubmit(
NVCVOperatorHandle handle,
cupvaStream_t stream,
NVCVImageHandle in,
NVCVImageHandle out,
PVAFlipDirection flipDirection,
)#

Submits the ImageFlip operator to a cuPVA stream.

Parameters:
  • handle[in] Handle to the operator.

    • Must not be NULL.

  • stream[in] Handle to a valid cuPVA stream.

  • in[in] Input image handle.

  • out[out] Output image handle.

  • flipDirection[in] Direction of the flip operation.

    • PVA_FLIP_HORIZONTAL: Flip horizontally (left-right)

    • PVA_FLIP_VERTICAL: Flip vertically (up-down)

    • PVA_FLIP_BOTH: Flip both directions (180° rotation)

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null, images are invalid, or flipDirection is invalid.

  • NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.

  • NVCV_SUCCESS – Operation executed successfully.