CropFlipNormalizeReformat

cvcuda.crop_flip_normalize_reformat(src: nvcv.ImageBatchVarShape, out_shape: tuple, out_dtype: nvcv.Type, out_layout: nvcv.TensorLayout, rect: nvcv.Tensor, flip_code: nvcv.Tensor, base: nvcv.Tensor, scale: nvcv.Tensor, globalscale: float = 1.0, globalshift: float = 0.0, epsilon: float = 0.0, flags: Optional[int] = None, border: cvcuda.Border = <Border.CONSTANT: 0>, bvalue: float = 0, *, stream: Optional[nvcv.cuda.Stream] = None) nvcv.Tensor

Executes the CropFlipNormalizeReformat operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Copy Make Border operator for more details and usage examples.

Parameters:
  • src (nvcv.ImageBatchVarShape) – Input image batch containing one or more images.

  • out_shape (tuple) – The shape of the output.

  • out_dtype (numpy.dtype) – The data type of the output.

  • out_layout (nvcv.TensorLayout) – The layout of the output.

  • rect (nvcv.Tensor) – The crop rectangle tensor which has shape of [batch_size, 1, 1, 4] in reference to the input tensor. The crop value of [crop_x, crop_y, crop_width, crop_height] stored in the final dimension of the crop tensor, provided per image.

  • flip_code (nvcv.Tensor) – A tensor flag to specify how to flip the array; 0 means flipping around the x-axis, 1 means flipping around the y-axis, -1 means flipping around both axes, and any other value will result in no flip, provided per image.

  • base (nvcv.Tensor) – Tensor providing base values for normalization.

  • scale (nvcv.Tensor) – Tensor providing scale values for normalization.

  • globalscale (float, optional) – Additional scale value to be used in addition to scale

  • globalshift (float, optional) – Additional bias value to be used in addition to base.

  • epsilon (float, optional) – Epsilon to use when CVCUDA_NORMALIZE_SCALE_IS_STDDEV flag is set as a regularizing term to be added to variance.

  • flags (int, optional) – Algorithm flags, use CVCUDA_NORMALIZE_SCALE_IS_STDDEV if scale passed as argument is standard deviation instead or 0 if it is scaling.

  • border (cvcuda.Border, optional) – Border mode to be used when accessing elements outside input image.

  • bvalue (float, optional) – Border value to be used for constant border mode cvcuda.Border.CONSTANT.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

None

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.crop_flip_normalize_reformat_into(dst: nvcv.Tensor, src: nvcv.ImageBatchVarShape, rect: nvcv.Tensor, flip_code: nvcv.Tensor, base: nvcv.Tensor, scale: nvcv.Tensor, globalscale: float = 1.0, globalshift: float = 0.0, epsilon: float = 0.0, flags: Optional[int] = None, border: cvcuda.Border = <Border.CONSTANT: 0>, bvalue: float = 0, *, stream: Optional[nvcv.cuda.Stream] = None) nvcv.Tensor

Executes the CropFlipNormalizeReformat operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Copy Make Border operator for more details and usage examples.

Parameters:
  • dst (nvcv.ImageBatchVarShape) – Output image batch containing the result of the operation.

  • src (nvcv.ImageBatchVarShape) – Input image batch containing one or more images.

  • rect (nvcv.Tensor) – The crop rectangle tensor which has shape of [batch_size, 1, 1, 4] in reference to the input tensor. The crop value of [crop_x, crop_y, crop_width, crop_height] stored in the final dimension of the crop tensor, provided per image.

  • flip_code (nvcv.Tensor) – A tensor flag to specify how to flip the array; 0 means flipping around the x-axis, 1 means flipping around the y-axis, -1 means flipping around both axes, and any other value will result in no flip, provided per image.

  • base (nvcv.Tensor) – Tensor providing base values for normalization.

  • scale (nvcv.Tensor) – Tensor providing scale values for normalization.

  • globalscale (float, optional) – Additional scale value to be used in addition to scale

  • globalshift (float, optional) – Additional bias value to be used in addition to base.

  • epsilon (float, optional) – Epsilon to use when CVCUDA_NORMALIZE_SCALE_IS_STDDEV flag is set as a regularizing term to be added to variance.

  • flags (int, optional) – Algorithm flags, use CVCUDA_NORMALIZE_SCALE_IS_STDDEV if scale passed as argument is standard deviation instead or 0 if it is scaling.

  • border (cvcuda.Border, optional) – Border mode to be used when accessing elements outside input image.

  • bvalue (float, optional) – Border value to be used for constant border mode cvcuda.Border.CONSTANT.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

None

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.