- Description:
- Used as part of histogram equalization, it takes, as input, the histogram of an image, generates the CDF (cumulative distribution function) of the histogram, and then generates a lookup table that can be used against the input image to generate an output image with an equalized histogram.
The VXLIB_equalizeHist_i8u_o8u function can do all of this in one shot, however, if the image processing is to be broken up into blocks (for DMA for example), then the user needs access to this function separate from the image access functions. The order of operation would be to use:
- VXLIB_histogramSimple_i8u_o32u (for every block in the image)
- VXLIB_histogramCdfLut_i32u_o8u (once on the final output histogram of VXLIB_histogramSimple_i8u_o32u)
- VXLIB_tableLookup_i8u_o8u (for every block in the image)
- Parameters
-
[in] | src[] | Pointer to histogram of an image containing 256 bins (UQ32.0) |
[out] | cdf[] | Pointer to cumulative distribution output containing 256 bins (optional) (UQ32.0) |
[out] | dst[] | Pointer to lookup table output containing 256 entries (optional) (UQ8.0) |
[in] | numPixels | Number of pixels in the image that the src[] histogram comes from (UQ32.0) |
[in] | minValue | Minimum value in the image that the src[] histogram comes from (UQ32.0) |
- Assumptions:
- I/O buffer pointers are assumed to be not aliased.
- All buffer pointers are 8 byte aligned
- All buffer pointers point to arrays of 256 entries each
- Performance Considerations:
- For best performance, the following parameter settings are recommended:
- Both cdf and dst buffers are optional. Put a NULL pointer for the output which is not needed.