Announcement

Collapse
No announcement yet.

Finding the Luminosity of a single pixel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Finding the Luminosity of a single pixel

    Hello everyone,

    I thought this would be relatively simple to find out but both a google search nor one on here yielded any results. If I want to know the luminosity of a single pixel how do I go about it?

    This is what I tried so far, zoom into pixel level > select desired one with the rectangular marque tool > open curves adjust layer > select pixel with the hand and read out the value. (98)

    Logically I thought it would be best to do this using the luminosity histogram, but I got a different value when I did it this way. (118)

    Thirdly I thought, hang on surely it's just a matter of adding up the three R,G,B values and dividing by three...nope (84)

    Finally I converted the mode to LAB and read out the lightness value..(132)

    Please put this muppet out of his misery...What is the correct answer?
    Last edited by milesburden; 11-26-2013, 03:59 AM.

  • #2
    Re: Finding the Luminosity of a single pixel

    The correct answer is: It depends.
    Luminosity (RGB/YCbCr) is not the same as Lightness (LAB) is not the same as Value (HSV)... a lot of different things to describe a similar concept, but all work a little differently.
    Perhaps the easiest way to find the RGB luminosity of any pixel in the image is to apply a Hue/Saturation adj. layer on top set the Saturation to -100 and the blend mode to "Color". The values that you see now are pure luminosity.
    If you want to do the math yourself you can check this here: https://en.wikipedia.org/wiki/YCbCr#...601_conversion
    Basically it's Luminosity = 0.299 * R + 0.587 * G + 0.114 * B

    Comment


    • #3
      Re: Finding the Luminosity of a single pixel

      Thank you! I really appreciate it....knew this place would come up trumps.

      Miles

      Comment


      • #4
        Re: Finding the Luminosity of a single pixel

        So, say I wanted to now select all the pixels with a luminosity between 50-100. What would be the best way to do that?

        I understand that if I want to apply an adjustment to that range I'd use the blend if sliders but what about making a selection of that specific luminance range?

        I'm thinking a colour fill of white selecting that range with the 'blend if sliders' and then 2 black fills on the rest might work?

        Thanks in advance,

        Miles
        Last edited by milesburden; 11-26-2013, 04:56 AM.

        Comment


        • #5
          Re: Finding the Luminosity of a single pixel

          http://i48.photobucket.com/albums/f2...ps3aba2616.png

          Like that? Looks like it worked, thanks. Just what I was after!

          Comment


          • #6
            Re: Finding the Luminosity of a single pixel

            Some interesting reading...


            You can find at least 5 methods used within Photoshop.

            Comment


            • #7
              Re: Finding the Luminosity of a single pixel

              I was tempted to reply to this, as it’s technically very easy but could open up a can of worms if used without correct interpretation!

              Zoom in your image to the max (3200% in CC and recent versions)
              Choose the eyedropper tool and set it to Point Sample in the options bar (default)
              Double-click on the Foreground Swatch in the Tools, in order to open up the Color Picker
              In the Color Picker you can read off any value you like, in HSB, RGB, CMYK and LAB, and you’ll see the Brightness value listed as B if you read the letters HSB downwards. All those numbers may seem to run into one but they are in fact four distinct fields – not very well designed!

              If it's a greyscale image, just read off the value in the Info Panel.

              We don’t often use Brightness as a value in Photoshop on RGB or CMYK images. It’s possible that you’re actually looking for the Luminance in LAB (see the L on the other side of the Color Picker).

              Whether or not the Brightness value as such makes sense, or indeed has any meaning – it depends a lot on why you’d want to know that, and how you intend to use it. What colour space are you in? What is the document’s working profile?

              allthebest

              Gry

              Comment


              • #8
                Re: Finding the Luminosity of a single pixel

                It seems I'll never understand some of these requests. Why would you want to know a sample from one pixel on a regular basis? Noise, rounding during interpolation, etc. render such a measurement not very interesting. Was it a strand of hair or something like that? Even then the results may not be as you expect.

                Comment


                • #9
                  Re: Finding the Luminosity of a single pixel

                  Originally posted by milesburden View Post
                  http://i48.photobucket.com/albums/f2...ps3aba2616.png

                  Like that? Looks like it worked, thanks. Just what I was after!
                  Whoa! I got a bit lost.

                  So, you created 3 new fills set to normal, then you went to layer style, blend if, and adjusted "underlying layer" blending values without splitting the sliders.

                  What's to be gained by doing this???

                  I mean, maybe you can get a good mask by blending at individual channels?

                  What do you guys use blend if sliders for?
                  Last edited by skoobey; 11-28-2013, 09:14 AM.

                  Comment


                  • #10
                    Re: Finding the Luminosity of a single pixel

                    There's some mixed responses here. I'll answer them individually:

                    Gry: Thanks for your input, it's much appreciated. I'm a big fan of your work!

                    Klev & Scooby: The reason I wanted to know how to determine individual luminosity levels was twofold, I'm currently spending a lot of time (like most of you I expect) playing about with colour adjustments and I've grown incredibly fond of luminosity masks but wanted to have more control over the range that is selected. It's not a specific problem as such but an experimental technique. Say theres a particular luminosity range or even a specific range within an object in an image that I wanted to play a blue through. From the useful input I've had on this thread I can now sample some pixels across that item and get a luminosity range for it. I now know what values to target with my blend if sliders or can create a mask of that desired range.

                    Skooby; I was experimenting, trying to create a mask in a manner I hadn't done before, how else am I expected to learn if I don't experiment/ask? I did this with different methods, once by splitting the sliders and another without, I played with the blend modes also. It targeted the range I wanted, and I can adjust the mask if it's too harsh. No need to snigger. I'm fully aware that you can create masks with channels, and numerous other methods. I just wanted to try/learn a different technique.

                    Miles
                    Last edited by milesburden; 11-28-2013, 11:36 AM.

                    Comment


                    • #11
                      Re: Finding the Luminosity of a single pixel

                      Originally posted by milesburden View Post
                      There's some mixed responses here. I'll answer them individually:

                      Gry: Thanks for your input, it's much appreciated. I'm a big fan of your work!

                      Klev & Scooby: The reason I wanted to know how to determine individual luminance levels was twofold, I'm currently spending a lot of time (like most of you I expect) playing about with colour adjustments and I've grown incredibly fond of luminosity masks but wanted to have more control over the range that is selected. It's not a specific problem as such but an experimental technique. Say theres a particular luminance range or even a specific range within an object in an image that I wanted to play a blue through. From the useful input I've had on this thread I can now sample some pixels across that item and get a luminance range for it. I now know what values to target with my blend if sliders or can create a mask of that desired range. Why that's baffling to some of you I'm not sure?

                      Skooby; I was experimenting, trying to create a mask in a manner I hadn't done before, how else am I expected to learn if I don't experiment/ask? I did this with different methods, once by splitting the sliders and another without, I played with the blend modes also. It targeted the range I wanted, and I can adjust the mask if it's too harsh. No need to snigger. I'm fully aware that you can create masks with channels, and numerous other methods. I just wanted to try/learn a different technique.

                      Miles
                      If you want to colorize a specific tonal range, you can do that by a gradient mask, then use blending modes (making transparent parts of the gradient is a great way to avoid masking, or at least most of it).

                      I thought you had a specific task at hand, so I wanted to learn more form you, not discourage you.

                      It can definitely be a good way to do masking without going into actual pixels, only adjustment layers.

                      Comment


                      • #12
                        Re: Finding the Luminosity of a single pixel

                        Seems I misinterpreted the nature of your response and jumped the gun, apologies for that.
                        By gradient mask do you mean a black and white gradient map masking the specific tones required or am I lost?

                        Miles

                        Comment


                        • #13
                          Re: Finding the Luminosity of a single pixel

                          "Say theres a particular luminosity range or even a specific range within an object in an image that I wanted to play a blue through"

                          You make a blue color sample in a gradient map, make the other to samples transparent, and adjust it's position. Blend as you wish.

                          Comment


                          • #14
                            Re: Finding the Luminosity of a single pixel

                            Hi Skoobey, sorry I got lost by the term 'gradient mask' as opposed to 'gradient map'. That makes perfect sense, and would skip a few unneeded steps. I'll spend a little more time thinking about the problem before asking a question in future as that solution now seems bloody obvious. Thanks for your help.


                            Miles

                            Comment


                            • #15
                              Re: Finding the Luminosity of a single pixel

                              I'm so sorry. Yes, GRADIENT MAP.

                              Comment

                              Related Topics

                              Collapse

                              • Rexx
                                Did you know this about the S curve? I didn't!
                                by Rexx
                                I had a shattering "out-of-Photoshop" experience today! The S curve works completely different from what I thought. If you're interested, you may have a look at the complete thread here DP Review thread about S curve but I can give you the summary:

                                Andrea writes
                                Then...
                                04-10-2005, 01:42 AM
                              • ISO
                                how to separate colour and luminance from RGB
                                by ISO
                                Hello friends

                                I want help (detailled tutorial) for separating colour and luminance from RGB.

                                Thanks in advance.

                                Regards

                                Mukund
                                06-08-2011, 06:30 AM
                              • bart_hickman
                                LAB versus HSL
                                by bart_hickman
                                I see a lot of folks convert to the LAB color space (and back again) and you most often say you're doing it so you can edit luminance and color informaton separately.

                                My question is, why not use the HSL color space instead? It seems more intuitive. Photoshop has the Hue, Saturation...
                                03-10-2006, 07:30 PM
                              • Rachel
                                Unsharpen Mask / Luminosity
                                by Rachel
                                If you want to apply sharpening to an image and do not want to switch to lab mode, here is another method to do so...

                                Unsharpen Mask settings:

                                Divide the output resolution by 200 and this determines your radius.
                                Threshold: Setting of 4-8 reduces graininess in flesh...
                                07-26-2002, 11:54 AM
                              • transoptic
                                Curves layer in Luminosity?
                                by transoptic
                                Would it be advantageous to make your curves layer in Luminosity mode to avoid color shifts? Does anyone do this? I get a feel that I retain saturation better this way.
                                06-07-2009, 03:28 PM
                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎