1. Welcome to NikonCafe.com—a friendly Nikon camera & photography discussion forum!

    If you are thinking of buying a camera or need help with your photos, you will find our forum members full of advice! Click here to join for free!

Magenta highlights

Discussion in 'General Technical Discussion' started by Iliah, Mar 17, 2005.

  1. Iliah


    Jan 29, 2005
    The issue was brought once more in Dan Margulis "Color Theory" list. I think it might be of interest here too.

    Magenta is lack of green. The reason behind magenta tint is multiplication of raw data on white balance coefficients in red and blue, as well as data truncation due to bit limit of the result.

    Here is how it may happen. Let's assume the highlight recorded by the camera is (R,G,B) = (2100, 4095, 3011) in 12-bit (max = 4095). White balance coefficients recorded for particular light are (Cr, Cg, Cb) = (1.95, 1, 1.36). Performing multiplication you will have perfect white - (4095, 4095, 4095).

    Now, let's see what is going on when green channel is overexposed. (R, G, B) now can reach for example (2835, 4095, 4064). Red channel and blue channel had some room to grow, while green was already saturated. Applying same coefficients we have (5528, 4095, 5527). As you see, red and blue channels are balanced, while green is lacking. Hence magenta tint.

    To avoid this tint we can truncate values to 4095, or to use different "tricks" to restore green.

    Another issue with false highlight coloration arises due to two-stage approach to applying white balance in some raw converters. If highlights are already truncated at first stage in one or two channels when camera white balance is applied, on the second stage, when we use resulting data for manual white balance tweaks, highlight false colouration may be grossly amplified.
  2. Good lord Iliah, what do you see when you look at a rainbow? (grin).

    I'm so glad you're a part of this forum!

    Question: Under what circumstances would the green channel be blown? I always assumed it was the most neutral of the three and that adjustments made to red & blue could balance image color.

  3. Iliah


    Jan 29, 2005
    If image is overexposed, and composite histogram strongly hits the right wall - green is overexposed.
  4. So if I understand you correctly, a magenta tint isn't caused by anything more than the sensor maxing out the green channel, correct?

    And if I understand correctly, the mistake made is in boosting the R/B values so that they balance and then truncating them down to 4095 because it actually makes the magenta tint problem worse. right?

    What should we do when the green is blown?

  5. Iliah


    Jan 29, 2005
    Not exactly. If we truncate red and blue channels back to 4095, we loose all the details which still may exist in those channels; but we maintain neutrality in the extreme highlights. If we let highlights in red and blue channels be higher then 4095, we keep details, but we gain magenta tint.
    You can use a layer of channel mixer, set to monochrome; and assign blurred highlight mask to that channel.
  6. Wow! I totally understood that.

    Thanks for the suggestion, I will try the channel mixer.

    Thanks Iliah!!

  7. MontyDog


    Jan 30, 2005
    #1064 - You have an error in your SQL syntax;
  8. Blurred Highlights Mask?????


    One of your suggestions here is this: "You can use a layer of channel mixer, set to monochrome; and assign blurred highlight mask to that channel."

    Could you please clarify how to do this? When I go to the channel mixer, I select green as the output channel, check the monochrome box and say okay.

    Then here is where I really get lost. I couldn't figure out how to do the last part. How does one assign a blurred highlights mask to that channel?
  9. obelix


    Mar 17, 2005
    Fremont, CA, USA
    Ah, thanks Iliah.

    That explains the magical magenta cast in the high DR mode in RM.
  10. Iliah


    Jan 29, 2005
    No, not exactly :)  It has more to do with the nature of digital cameras then with RM :) 
  11. Iliah


    Jan 29, 2005
    Re: Blurred Highlights Mask?????

    Is the result sufficiently good?

    Can you select highlights before adding channel mixer layer?
  12. Need more details, Iliah

    Iliah, I am just trying to understand the procedure, so I don't have an image that has this problem now. I'm just going attempting to do what you have to suggested.

    The only way I can figure out how to get to highlights before going to the channel mixer is to go to select, color range. One can then pick highlights, but I'm not sure what preview to use. Is this the best way to do this? Please advise.

    Then one could select Color Mixer and select the green layer, but then how would you blur it (filters?) and how should one get back to the color image?
  13. Iliah


    Jan 29, 2005
    Yes, you can use that to select the highlights; or sample magenta with the eyedropper in Alt-SC menu, "sampled colors" mode; or just try "magentas" from drop-down menu.

    Then add channel mixer layer. Selection will be automatically turned into a mask.

    For adjustment layers mask is always active, so you can select Gaussian blur, and mask will be blurred. You can also use black and white brushes, brushes will paint on mask.

    I use preview in Quick mask mode. To have good contrast, you can double-click on the Quick mask button in tool palette and change it's colour to blue. Then you need to leave the Quick Mask mode, hitting the button to the left of it.
  14. Iliah, I haven't had time to get back to this, so I'll have to try these things when I have more time to experiment.

    aka beaucamera
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.