Normalize

cvcuda.normalize(src: nvcv.Tensor, base: nvcv.Tensor, scale: nvcv.Tensor, flags: int, globalscale: float, globalshift: float, epsilon: float, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor

Executes the Normalize operation on the given cuda stream.

See also

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

Parameters:
  • src (nvcv.Tensor) – Input tensor containing one or more images.

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

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

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

  • 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.NormalizeFlags.SCALE_IS_STDDEV flag is set as a regularizing term to be added to variance.

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

Returns:

The output tensor.

Return type:

nvcv.Tensor

Caution

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

cvcuda.normalize(src: nvcv.ImageBatchVarShape, base: nvcv.Tensor, scale: nvcv.Tensor, flags: int, globalscale: float, globalshift: float, epsilon: float, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.ImageBatchVarShape

Executes the Normalize operation on the given cuda stream.

See also

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

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

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

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

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

  • 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.NormalizeFlags.SCALE_IS_STDDEV flag is set as a regularizing term to be added to variance.

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

Returns:

The output image batch.

Return type:

nvcv.ImageBatchVarShape

Caution

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

cvcuda.normalize_into(dst: nvcv.Tensor, src: nvcv.Tensor, base: nvcv.Tensor, scale: nvcv.Tensor, flags: int, globalscale: float, globalshift: float, epsilon: float, stream: nvcv.cuda.Stream | None = None)

Executes the Normalize operation on the given cuda stream.

See also

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

Parameters:
  • dst (nvcv.Tensor) – Output tensor to store the result of the operation.

  • src (nvcv.Tensor) – Input tensor containing one or more images.

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

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

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

  • 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.NormalizeFlags.SCALE_IS_STDDEV flag is set as a regularizing term to be added to variance.

  • 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.normalize_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, base: nvcv.Tensor, scale: nvcv.Tensor, flags: int, globalscale: float, globalshift: float, epsilon: float, stream: Optional[nvcv.cuda.Stream] = None)

Executes the Normalize operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Normalize 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.

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

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

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

  • 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.NormalizeFlags.SCALE_IS_STDDEV flag is set as a regularizing term to be added to variance.

  • 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.