4

One method of white balancing in Photoshop involves:

  1. Adding a difference layer filled with 50% grey over existing image.
  2. Adding a threshold layer over that and sliding the slider to the left until just a small handful of black dots are left.
  3. Using the eyedropper tool with shift to mark one of the clusters of black pixels.
  4. Hiding grey and threshold layers and creating a curves layer then using the grey point eyedropper to sample the point marked in the previous step.

This method works very well. Can someone please explain why this works? Are there cases where this doesn't produce the best results?

  • 1
    When you say you’re looking for the math, would a color theory explanation suffice or do you really want the formulas behind the steps? – Hueco Jun 14 at 16:04
  • @Hueco worth a try would be helpful if it included a detailed explanation of what the difference layer does and what the threshold layer isolates. Are there any circumstances this method doesn't work? – Sarkiko Jun 14 at 18:35
  • What photographic purpose do you have for wanting the math behind this function? This reads like an X→Y problem where you ask how to do a "possible" solution instead of what you are really trying to do. Your potential solution may or may not solve your root problem. Even if it does, there may be better ways to get what you want. – Michael C Jun 14 at 18:42
  • @MichaelC I'm just trying to get a better handle of how and why it works and understanding how the layers manipulate the pixels better will help me understand. – Sarkiko Jun 14 at 20:08
2

In the image you get before the thresholding, the darker the pixels, the closer the corresponding pixels in the photo are to the the 50% grey you filled the layer with.

Then, by applying a threshold, you keep only the very dark pixels, that are the ones that where very close to the 50% grey in the initial image. So your black clusters are really a map of the pixels that are 50% grey in the photo.

Replace your photo with a black-to-white gradient to check it out.

color correction

  • Will it be pixels that are close to 50% grey in luminosity or color or both? – Sarkiko Jun 16 at 16:11
  • Close that whavever color you use in the initial bucket-fill. – xenoid Jun 16 at 17:23
  • Why would adjusting curves to make pixels, that are already gray, gray color balance an image? – xiota Jun 16 at 19:46
  • They are not gray, they have about the same luminosity as gray... It seems that the rest of the process picks the actual color on these pixels and makes sure it is exactly gray. Like this. – xenoid Jun 16 at 20:15
0

I didn't quite understand xenoid's explanation at first, so here is my take. It's basically the same, but with different words.

  • The difference layer will show black when pixels are exactly the same color (gray). Colors that are close to gray will also look black because it's difficult to judge colors that are close to black.

  • The threshold adjustment limits the effect so that only colors close to gray are affected.

  • The black splotches that are left over correspond to colors that are close to gray. Presumably, any deviation from gray in these pixels applies to the entire image, so by making them gray, the rest of the image is corrected as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.