CLAHE

group CLAHE

Functions

NVCVStatus cvcudaCLAHECreate(NVCVOperatorHandle *handle, int32_t maxBatchSize, int32_t tilesX, int32_t tilesY)

Constructs an instance of the CLAHE operator.

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

    • Must not be NULL.

  • maxBatchSize[in] The maximum batch size this operator will process.

    • Must be >= 1.

  • tilesX[in] Number of tiles along width.

    • Must be >= 1.

  • tilesY[in] Number of tiles along height.

    • Must be >= 1.

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

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus cvcudaCLAHESubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorHandle in, NVCVTensorHandle out, float clipLimit)

Executes CLAHE on a tensor input/output on the given cuda stream.

Limitations:

Input: Data Layout: [kNHWC, kHWC, kNCHW, kCHW] Channels: [1]

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: [kNHWC, kHWC, kNCHW, kCHW] Channels: [1]

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[in] Handle to the operator.

    • Must not be NULL.

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

  • in[in] Input tensor.

  • out[out] Output tensor.

  • clipLimit[in] CLAHE clip limit value. Must be > 0.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.

  • NVCV_ERROR_INTERNAL – Internal error in the operator.

  • NVCV_SUCCESS – Operation executed successfully.

NVCVStatus cvcudaCLAHEVarShapeSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageBatchHandle in, NVCVImageBatchHandle out, float clipLimit)

Executes CLAHE on a varshape image batch on the given cuda stream.

Input and output images must be single-channel U8 and have matching per-image shape and format.

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

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

  • in[in] Input image batch.

  • out[out] Output image batch.

  • clipLimit[in] CLAHE clip limit value. Must be > 0.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.

  • NVCV_ERROR_INTERNAL – Internal error in the operator.

  • NVCV_SUCCESS – Operation executed successfully.