ImageHistogram#

Functions#

NVCVStatus pvaImageHistogramCreate(NVCVOperatorHandle *handle, NVCVTensorRequirements const *const inTensorRequirements, NVCVTensorRequirements const *const outTensorRequirements, PvaImageHistogramParams const *const imageHistogramParams)

Constructs and an instance of the ImageHistogram operator.

NVCVStatus pvaImageHistogramSubmit(NVCVOperatorHandle handle, cupvaStream_t stream, NVCVTensorHandle const in, NVCVTensorHandle out)

Executes the ImageHistogram operation on images.

Structs#

PvaImageHistogramParams

Parameters for image histogram operator.

Functions#

NVCVStatus pvaImageHistogramCreate(
NVCVOperatorHandle *handle,
NVCVTensorRequirements const *const inTensorRequirements,
NVCVTensorRequirements const *const outTensorRequirements,
PvaImageHistogramParams const *const imageHistogramParams,
)#

Constructs and an instance of the ImageHistogram operator.

Limitations:

 The ranges of the image histogram parameters are listed as follows:
 - 0 <= start < end <= 256 for input tensor data type NVCV_DATA_TYPE_U8
 - 0 <= start < end <= 65536 for input tensor data type NVCV_DATA_TYPE_U16
 - 0 < numBins <= 256 for input tensor data type NVCV_DATA_TYPE_U8
 - 0 < numBins <= 16384 for input tensor data type NVCV_DATA_TYPE_U16
Input: Data Layout: [HWC, NHWC] Batches: [1] Channels: [1]

Rank: 3 for [HWC] or 4 for [NHWC].

Data Type

Allowed

8bit Unsigned

Yes

8bit Signed

No

16bit Unsigned

Yes

16bit Signed

No

32bit Unsigned

No

32bit Signed

No

32bit Float

No

64bit Float

No

Output: Data Layout: [HWC, NHWC] Batches: [1] Height: [1] Width: >= numBins Channels: [1]

Rank: 3 for [HWC] or 4 for [NHWC].

Data Type

Allowed

8bit Unsigned

No

8bit Signed

No

16bit Unsigned

No

16bit Signed

No

32bit Unsigned

Yes

32bit Signed

Yes

32bit Float

No

64bit Float

No

Input/Output Dependency:

Property

Input == Output

Data Layout

N/A

Data Type

N/A

Number

N/A

Channels

N/A

Width

N/A

Height

N/A

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

    • Must not be NULL.

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

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

  • imageHistogramParams[in] Pointer to the ImageHistogram parameters.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Handle is null or some parameter is outside valid range.

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.

  • NVCV_ERROR_INVALID_IMAGE_FORMAT – Image format is invalid.

  • NVCV_SUCCESS – Operation executed successfully.

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

Executes the ImageHistogram 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 histogram 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.