13 Replies Latest reply on Feb 13, 2011 3:53 AM by Vit Novak

    Strange color cast in blue range

    Vit Novak Level 3

      During experimenting with color profiles for Canon compact cameras which are not supported by ACR (those using CHDK software to get raw files), a noticed a sort of issue with Exposure correction in ACR. So, looking at the code in SDK, it seems that using Exposure correction to increase exposure should produce the same effect as increasing the exposure on the camera. But, on blow parts of the picture there is a strange color artifacts in blue region. To illustrate this, a took several photos of my custom test image, shown on a simple CRT display. Photos can be downloaded from this link




      Photos are taken with Canon 400D DSLR. All ACR settings were at default (WB as shot, Brightness 50, Contrast 25, Recovery 0 etc ...). To avoid efects of the lookup table in Adobe standard profile for 400D, I made a custom profile with small delphi utility, which set all SatScale and ValScale values in lookup table to 1 and HueShift to 0, so we have conversion only using color /forward matrix from Adobe standard profile for 400D. ACR was version 5.7


      So we have photos 2316, 2317, 2318, with exposure times 1, 2 and 4s. And we have photos 2316 EV+1 and 2316 EV+2, made from 2316, using the exposure slider set to +1 and +2. Comparing 2317 with 2316 EV+1 and 2318 with 2316 EV+1, yo can see strange saturated violet patch over region of blown blue colors, which is not present when exposure correction was used on the camera. And, looking carefuly to 2316 (with no correction at all), there is a trace of this violet cast at the same place, in a form of slight horizontal violet patch over blue color region, at the position where blue channel reached saturation


      Well, I can't find a code responsible for this inside SDK sources, so I presume it's in ACR. My assumption is that this was done a while ago, to avoid blown blue color turning cyan (like in some old digital cameras), so hue of blown blue is increased using some algorithm, but this correction seems to be too strong for saturated


      I would like to get somme coments about this from the authors of ACR. I understand that this issuse is shown in very rare cases (in my case, several photos taken under colored fluorescent lighting in a dance hall, where ACR shown some strange colors around the blue lights, which were much better dealt with on the jpeg-s from camera, and usage of recovery slider didn't help), but maybe algorithm dealing with blown highlights could bear some improvements

        • 1. Re: Strange color cast in blue range
          Vit Novak Level 3

          So, it seems nobody is interested in this issue, as there is no answer in several days. Ok ...

          • 2. Re: Strange color cast in blue range
            Yammer Level 4

            Vit Novak wrote:


            So, it seems nobody is interested in this issue, as there is no answer in several days. Ok ...

            You lost me when you said "Canon compact cameras".

            • 3. Re: Strange color cast in blue range
              Vit Novak Level 3

              Hi, Yammer


              Sampes I attached are taken with my EOS 400D, quite ordinary DSLR, although this issue is more visible on compact cameras (I have also A620 and A650), where position of blue primary of the sensor is further from the white point (so more of the blue region fall out of Adobe Photo Pro color space and is clipped after matrix operation with Forward matrix and before a conversion using LUT tables - even if the scene was an image displayed on sRGB color monitor). Also, it's more visible when using lower WB temperature (I can't simluate this with monitor, as it doesn't go lower than 5000K)

              • 4. Re: Strange color cast in blue range
                MadManChan2000 Adobe Employee

                I have not had a chance to study this in detail, but upon reading your description, I believe the issue is clipping in camera space versus clipping in a working RGB space. Post-capture exposure adjustments in ACR are applied in the RIMM RGB working space (ProPhoto RGB primaries) whereas exposure adjustments at the time of capture means scaling the exposure in the camera-native RGB space (i.e., sensor CFA primaries). Depending on the color matrix used (the transformation from camera RGB to RIMM), this can result in different clipping effects.

                • 5. Re: Strange color cast in blue range
                  Vit Novak Level 3

                  Hi Chan, thanks for answering


                  Yes, looking at sdk source, a I see exposure curve is applied after conversion to RIMM RGB. So I presume it's possible that pure sRGB blue is clipped towards violet instead towards cyan like in camera, resulting with this strange (although very rare in real photos) effect.


                  Just for info, I made another experiment. From mentioned profile, attached in above file, I made another one. In that profile, I replaced forward matrix with the matrix from the function dng_space_ProPhoto, so that after matrix operation (DoBaselineABCtoRGB)  we are back in camera color space. I recalculated whole LUT, trying to adhere to code in sdk, so that conversion to RIMM is done by LUT alone. In that case, this violet effect in highlights is not present, and colors in the parts of the picture that are not blown are the same as with "proper" profile


                  Wondering, what is the purpose of forward matrix anyway, if whole conversion can be done just by the LUT, gaining some speed, as this matrix operation can be skipped (and truncation to RIMM RGB) ?


                  I will be on a vacation about  2 weeks, so you don't need to hurry with the answer 



                  • 6. Re: Strange color cast in blue range
                    MadManChan2000 Adobe Employee

                    Hi, the forward matrix + LUT combination can be often preferable for smoothness and compactness reasons. That is, a matrix can perform the bulk of the transformation from the sensor primaries to the RIMM primaries, then rely on a smaller (sparser) LUT for some non-linear corrections. As you have noticed, however, because of clipping between the two stages, there can be cases where highly saturated colors are shifted. This can be handled in a couple of ways: one of them you have described already (i.e., using only the LUT); another is to desaturate the forward matrix slightly to minimize clipping during the camera-to-RIMM conversion, then use the LUT to adjust the saturation and compress the gamut as desired.

                    • 7. Re: Strange color cast in blue range
                      Vit Novak Level 3

                      Hi, Chan


                      Thanks for the explanation of this subject. Anyway ... there are quite a number of possibilities that something is clipped during whole process. First, some channels can be clipped off at the sensor level, than after matrix conversion to RIMM, than if EV slider is used (and even if it isn't, because there is baseline exposure value)  ... or Saturation slider ... then after correction using LUT ... and finally during conversion to sRGB / AdobeRGB / whatever ... maybe some sort of soft clipping at some of these points would be better (just my opinion)


                      However, there is another highlight issue I noticed, illustrated with these two samples (Canon 400D, ACR 5.7, windows platform)




                      Left picture has all default settings. On the right picture, everything is the same, except that I made a small patch with adjustment brush tool at the top left corner (far from the center of the picture) and changed exposure value of the adjustment brush to a nonzero value (other adjustment brush sliders don't produce similar strange effect). Appearance of the area of the Sun changes abruptly and looks strange. Test with my HSV image from previous post shows that all colors are affected (not only yellow)


                      Also, there is a similar abrupt change in the highlight behavior if I lower the global EV slider from -0.25 to -0.30 (0.25 is baseline exposure value for this camera), or if I raise Recovery slider from 6 to 7 (which seems to have similar effect). I think these two issues are unrelated to clipping in sensor color space vs. RIMM



                      • 8. Re: Strange color cast in blue range

                        I have the exact problem. When I use adobe bridge to view the folder where the raw files are saved, some of the raw files in the preview pane will  get corrupted. It only happened randomly in one or couple raw files in the folder. The corrupted section in the image mostly happened partially and you can see weird lines/colors in that particular area, not the whole image.


                        I would love to learn how to avoid this and how to repair the raw file. thanks.

                        • 9. Re: Strange color cast in blue range
                          MadManChan2000 Adobe Employee

                          That sounds to me like a different issue. In your case it does sound like an actual corrupted raw file (e.g., got corrupted during transfer from card to computer). Suggestions: try a different card reader, or try re-transferring the file.



                          • 10. Re: Strange color cast in blue range
                            MadManChan2000 Adobe Employee

                            Hi Vit, yes, this is a known issue & limitation with how we are doing internal processing of local Exposure adjustments at present. We will be addressing this.

                            • 12. Re: Strange color cast in blue range

                              Well, Vit, I think Adobe has to pay you for testing at least) Nice to know about the issue.


                              Btw. I`ve been told that some people encounter color shifts when moving from LR to PS. And I feel like I`ve seen this myself but can`t find an example image. I wonder how can it be when using ProPhoto space and 16bit files. Can LR do the clipping of colours differently when generating preview inside develop module and generating a file for PS? Or maybe PS treats spaces differently?

                              • 13. Re: Strange color cast in blue range
                                Vit Novak Level 3

                                Well, it turned out that issues I mentioned in this thread were already known to Adobe team. These issues had already been addressed in latest profiles published before I posted that question (except issue with brush)


                                I wouldn't know about PS vs LR differences, as I'm not using LR (don't like the interface where controls can be moved up or down with scroll bar - I wan't them to be fixed on the screen, like in ACR)