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...
            http://www.tannerhelland.com/3643/gr...algorithm-vb6/

            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

                              • vapour
                                Increasing Saturation Technique
                                by vapour
                                I've been wanting to find a technique that would increase overall saturation, but in a good way (if that makes sense).

                                I found a way that I think is in the right direction, may not be best, but it's a start.

                                Try the following...

                                1. Duplicate image to a new...
                                07-07-2009, 11:05 AM
                              • pixeltone
                                Is restoring this picture hopeless? Please look.
                                by pixeltone
                                I have a picture scanned and have looked at it very good in photoshop. I'm starting to believe there's nothing that can be done to repair it. I would really like your opionion on this picture.

                                Your opionion is really needed here.

                                The large sized picture can be viewed at...
                                11-04-2002, 07:48 PM
                              • Caravaggio
                                easy way to despeckle an image
                                by Caravaggio
                                Hi,

                                I'm looking for a technique to despeckle an image that produces acceptable results. I've been using dust and scratches filter and then selectively painting with white on a hide all mask over the spots but don't want to spend the time. Are there any plugins that would do the job or techniques?...
                                07-05-2014, 03:02 PM
                              • tash
                                tash
                                by tash
                                Hi,
                                I'm new to this site (and not a really experienced retoucher) and I'm not sure if I'm posting to the right place on the site.
                                Can anyone help me repair this image with light leak?
                                Thanks

                                ...
                                07-17-2014, 09:47 PM
                              • keliot
                                Color Shifts in Dark Skin Tones
                                by keliot
                                Hello.
                                This is a question from a beginner.

                                How do I avoid "color shifts" when retouching darker skin. It seems most adjustments such as curves/layers/D&B, selective color, etc I make lead to oranges and reds coming out and the skin looks less realistic and not true...
                                12-01-2015, 09:21 AM
                              Working...
                              X