HistogramEqualization#

Functions#

NVCVStatus pvaHistogramEqualizationCreate(NVCVOperatorHandle *handle, NVCVTensorRequirements *tensorRequirements)

Parameters for Histogram Equalization operator.

NVCVStatus pvaHistogramEqualizationSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVTensorHandle in, NVCVTensorHandle out)

Executes the Histogram Equalization operation on images.

Functions#

NVCVStatus pvaHistogramEqualizationCreate(
NVCVOperatorHandle *handle,
NVCVTensorRequirements *tensorRequirements,
)#

Parameters for Histogram Equalization operator.

Constructs and an instance of the Histogram Equalization operator. This operator finds a new mapping palette based on the original histogram of a grayscale image using the cumulative distribution function to transform the original pixel value to a new pixel value.

Limitations: This operator is designed to support only grayscale images based on their gray levels. The input image width be at least 129 pixels. The input image height be at least 17 pixels.

Input: Data Layout: [HWC]

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

No

64bit Float

No

Output: Data Layout: [HWC]

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

No

64bit Float

No

Input/Output Dependency:

Property

Input == Output

Data Layout

Yes

Data Type

Yes

Number

Yes

Channels

Yes

Width

Yes

Height

Yes

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

    • Must not be NULL.

  • tensorRequirements[in] Pointer to the NVCVTensorRequirements structure which contains input Tensor layout rank, shape and data type information.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null or tensorRequirements are not valid or outside a valid range.

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus pvaHistogramEqualizationSubmit(
NVCVOperatorHandle handle,
cupvaStream_t stream,
NVCVTensorHandle in,
NVCVTensorHandle out,
)#

Executes the Histogram Equalization operation on images.

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

    • Must not be NULL.

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

  • in[in] Input tensor handle.

  • out[out] Output tensor handle.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null.

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

  • NVCV_SUCCESS – Operation executed successfully.