3
\$\begingroup\$

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?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ 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? \$\endgroup\$
    – OnBreak.
    Jun 14, 2019 at 16:04
  • \$\begingroup\$ @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? \$\endgroup\$
    – Sarkiko
    Jun 14, 2019 at 18:35
  • \$\begingroup\$ 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. \$\endgroup\$
    – Michael C
    Jun 14, 2019 at 18:42
  • \$\begingroup\$ @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. \$\endgroup\$
    – Sarkiko
    Jun 14, 2019 at 20:08

1 Answer 1

2
\$\begingroup\$

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

\$\endgroup\$
4
  • \$\begingroup\$ Will it be pixels that are close to 50% grey in luminosity or color or both? \$\endgroup\$
    – Sarkiko
    Jun 16, 2019 at 16:11
  • \$\begingroup\$ Close that whavever color you use in the initial bucket-fill. \$\endgroup\$
    – xenoid
    Jun 16, 2019 at 17:23
  • \$\begingroup\$ Why would adjusting curves to make pixels, that are already gray, gray color balance an image? \$\endgroup\$
    – xiota
    Jun 16, 2019 at 19:46
  • \$\begingroup\$ 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. \$\endgroup\$
    – xenoid
    Jun 16, 2019 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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