Skip to main content
klj5
Known Participant
October 19, 2019
Respondido

Definition of 'light pixels' when I make a selection from channels

  • October 19, 2019
  • 2 respostas
  • 1063 Visualizações

I go CTRL + left click on RGB channel thumbnail to make a selection of bright pixels in an image that is nothing but pure white with a horizontally drawn black to white gradient. The info panel shows 50% bright point at exactly the midpoint of the image. However, the marching ants of the selection begin at 58% and include up to 100%. My question is 'why do the marching ants not start at 58% and not at 50%?' ... or, as per the subject line, what is the definition of light pixels when I go CTRL + left click on a channel thumbnail? Thanx in advance for helping me understand this. 

Este tópico foi fechado para respostas.
Melhor resposta por Michael J. Hoffman

When you make a selection by ctrl-clicking on a channel, the brightness value of the image determines the selection amount. Pixels with brightness of 255 are fully selected. Pixels with brightness value of 0 are not selected at all. Pixels with brightness values from 1 to 254 are selected with transparency of the brightenss value divided by 256 (so, for example, brightness values of 128 are selected 128/256, or 50% selected.

 

With partially transparent selections, the marching ants are to be used as an indicator and not as a precise measure. If you want to see exactly what is selected, create a new layer with the selection active, and fill it with color. You'll get the gradient you started with.

 

2 Respostas

D Fosse
Community Expert
Community Expert
October 20, 2019

This also has to do with the tone response curve / gamma encoding of the file's color space. This is what sets the actual numbers in the document. They may be different in different color spaces, for the same shade.

 

For several reasons (consistency among them) Photoshop handles "brightness" independent from the color space. This uses a concept called Luminosity, which is very similar to the Lab L channel, but not quite identical.

 

Ctrl+RGB produces a luminosity selection, using this luminosity curve. This is likely not the same as R=G=B values.

klj5
klj5Autor
Known Participant
October 20, 2019

Thank you very much for your explanation. I think what you're saying is that there isn't a direct correlation between luminosity and the 'B' in the HSB box in the info panel ...  perhaps only an indirect relationship?

D Fosse
Community Expert
Community Expert
October 20, 2019

HSB is not absolute. It is relative to whatever color space the file is in. The B equals averaged RGB values. H and S are even more relative, as they refer not to tone curve, but to the total gamut and shape of the color space.

 

You can easily test this for yourself - create an sRGB file, duplicate it and convert to ProPhoto, and compare measured numbers. They won't match.

 

This is the reason Photoshop uses this independent concept of Luminosity to deal with brightness values. It's consistent between color spaces. It also has other advantages, like preserving the inherent lightness of individual colors, like a bright yellow vs. a deep violet. In RGB or HSB they both come out as middle gray.

 

All that said, there is still a bit of secret sauce here, because nobody knows exactly what Luminosity is. It is very similar to Lab L, but not absolutely identical. Which is odd, because Lab is at the heart of all color management in Photoshop, and Lab numbers are always available "below the surface". It's probably just a custom modification once done for pragmatic reasons. It's not all that important, because Luminosity doesn't really need to be accurate. It just needs to correspond roughly to perceived brightness.

Michael J. Hoffman
Community Expert
Community Expert
October 20, 2019

When you make a selection by ctrl-clicking on a channel, the brightness value of the image determines the selection amount. Pixels with brightness of 255 are fully selected. Pixels with brightness value of 0 are not selected at all. Pixels with brightness values from 1 to 254 are selected with transparency of the brightenss value divided by 256 (so, for example, brightness values of 128 are selected 128/256, or 50% selected.

 

With partially transparent selections, the marching ants are to be used as an indicator and not as a precise measure. If you want to see exactly what is selected, create a new layer with the selection active, and fill it with color. You'll get the gradient you started with.

 

klj5
klj5Autor
Known Participant
October 20, 2019

Thanx for taking the time and effort to reply to my question, Michael. For me, the best takeaway from your response is "With partially transparent selections, the marching ants are to be used as an indicator and not as a precise measure." As you might have guessed, I was assuming that the marching ants on the first selection using CTRL + left click would indicate a selection precisely at the 50% brightness point, which is clearly not the case. 

" If you want to see exactly what is selected, create a new layer with the selection active, and fill it with color. You'll get the gradient you started with." I saw this exercise demonstrated in a tutorial on luminosity masks by Jesus Ramirez, whom I deeply respect for his amazing knowledge and ability to convey information in a very clear manner. However, in an exception to the rule, I didn't comprehend his explanation and wanted to go deeper to try to 'get it'. 

I flew Boeing 747's for a good many years and was good at it, as evidenced by the fact that I'm still alive. I also, prior to my retirement, did much teaching in the aviation world. I had hoped to extend some of my teaching background to our local camera club, wherein I was wanting to teach how to make luminosity masks. I think if I'm asked about the topic at hand, I'll just reply that 'it's magic'. :>)