You copied the Doc URL to your clipboard.

How do I fix a color shading issue caused by certain CWF lights?

Information in this article applies to:

  • Image Signal Processors


How do I fix a color shading issue caused by certain CWF lights?


This image was taken under Cool White Fluorescent (CWF) lights and it has a color shading issue: the center of the image has a greenish cast, and the edges have reddish casts, as shown in Figure 1.


Figure 1 Image with color shading issue

As shown in Figure 2, the imatest result indicates that the white balance error is larger because of failed color shading. How do I fix this issue?


Figure 2 White balance error measurement


Cause of the issue

A typical CWF light source is a non-Planckian light source with a color temperature of approximately 3900K (Kelvin). The Auto White Balance (AWB) algorithm runs CWF detection logic to estimate the color temperature. However, the color temperature of the problematic CWF light source is 3300K, a nd its spectral statistic distribution is close to the Planckian curve.

This situation causes the AWB algorithm to run normal Planckian detection logic to estimate the color temperature. As a result, the wrong AWB estimation leads to a mismatched mesh shading. The loading of this incorrect mesh shading causes the color shading issue and the AWB off issue.

Figure 3 shows the AWB statistic distribution plot. In this example, the color temperature is estimated as 3300K, so a low color temperature shading table is incorrectly used.


Figure 3 AWB verification plot with estimated color temperature 3300K


This issue can be improved with little effect on other light sources. Manually add a virtual light source with 3700K color temperature on the Planckian curve. Then, the AWB algorithm pulls up the estimated color temperature and loads the middle color temperature shading table accordingly.

One disadvantage of this workaround is that a real 3300K light source at the virtual light point might be mistaken for 3700K. It rarely occurs in real scene tests. However, Arm recommends that you also consider this scenario in your real application system, in case it occurs.

Figure 4 shows you how to add a virtual light source:


Figure 4 Adding a virtual light source

Figure 5 shows that the expected color temperature estimation is verified:


Figure 5 White point adjustment – 3720K is estimated

Test result

Figure 6 shows the test result of this workaround. The color shading issue is improved.


Figure 6 CWF test image after using the new method

Figure 7 shows that white balance error data is also decreased.


Figure 7 White balance error measurement



Related Information