Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Histogram equalization - am I doing it right?

cks2k2
Beginner
295 Views
From the online manual on YUV:
The principal advantage of the YUV model in image processing is decoupling of luminance and color information. The importance of this decoupling is that the luminance component of an image can be processed without affecting its color component. For example, the histogram equalization of the color image in the YUV format may be performed simply by applying histogram equalization to its Y component.
Based on this, my histogram equalization algo (input is RGB):
1. Use ippiRGBtoYCbCr_8u_C3P3R() to convert from RGB to YCbCr in planar format
2. Build histogram and cumulative distribution function using ippiHistogramEven_8u_C1R() only on Y channel
3. Use ippiLUT_8u_C1IR() to map new intensity transform from histogram to Y channel only.
4. Merge back planar YCbCr into pixel-order format
5. Convert YCbCr back to RGB
Does this look correct? I have implemented the algo but the results look a little strange. I have also experimented with using different color spaces i.e. HLS (using L channel), HSV (using V channel) and YUV (using Y channel) and all of them give very different results.
0 Kudos
1 Reply
Ying_H_Intel
Employee
295 Views
Hello CKS2K2,

It isa interested topic. but seems we can help a little.

for example, if you areonly talking about "doing simply histogram equalization to Y component of color image, you are correct tocall these IPP functions."And "the result look a little strange" means one of the function's result is not correct, then would you please provide us a small test case to show this?

But if you'd like to talk about the color image histogram equalization algorithm itself, like which give best result,the one based on single Y channel or the onebased on HLS, or HSV, or HSI or more algorithms (if you did search in internet) etc. You may need torefer to some professionalpapers like IEEE image processing or image processing professional book on color image histogram equalization. The result based on different algorithm are different. (It may be normal tosee colordistortion).

Best Regards,
Ying
0 Kudos
Reply