13 Replies Latest reply on Mar 8, 2013 6:22 AM by Michael L Hale

# Histogram | pixel position

Hi

Is there any way to find out histogram[0] represents which px to which px and similarly histogram[255] represents which px to which px

Histogram[0] represents the dark px is there any option to find out the pixel positions ?

like histogram[0]=px1 to 100 or something like that

• ###### 1. Re: Histogram | pixel position

In my understanding the histogram is a quantitative representation of pixels’ values and offers no represantation of spatial positions.

Your question seems somewhat unclear to me – could you elaborate (possibly by means of a mock-up)?

• ###### 2. Re: Histogram | pixel position

Hi CP, i understand that histogram[0] represents the most darkest pixels in the document, if thats the case it will be easy for me to figure out or select one from that bunch which will be my dark px. Similarly histogram[255] represents the most lightest pixels in the document, so i can get the light px also.

• ###### 3. Re: Histogram | pixel position

I'm just trying to break this post in to smaller parts so i can reach the goal. Any thought ?

• ###### 4. Re: Histogram | pixel position

Hi CP, i understand that histogram[0] represents the most darkest pixels in the document

Do you really?

Then take a look at the histogram for this gradient.

• ###### 5. Re: Histogram | pixel position

LOL

see if you can throw some light on the above CP in finding out the dark/light px

• ###### 6. Re: Histogram | pixel position

The histogram tells how many pixels have what values.

Just because there are x pixels of 0 R, y pixels of 0 G and z pixels of 0 B does not mean that any pixel has 0/0/0.

• ###### 7. Re: Histogram | pixel position

The luminosity histogram might (edited) be more useful for this, but I’m not sure that can be assessed with a Script.

• ###### 8. Re: Histogram | pixel position

An example of how the histogram can be identical for different images:

• ###### 9. Re: Histogram | pixel position

when I place my cursor in any place within the histogram,  the statistics panel tells me what's the level of the point and the count is also varying. Hence i thought there might be some hidden treasure

• ###### 10. Re: Histogram | pixel position

not heard about luminosity histogram, will google it, let me see what best can be do

• ###### 11. Re: Histogram | pixel position

Yes. The histogram might show same kind of curvature for different images for which the tonal values are same in. Right now, i'm restricting myself to 8 bit, rgb image.

This may not work for all the images but still 80-90% of the images falls within my requirements. Let me know your thoughts CP

• ###### 12. Re: Histogram | pixel position

Luminosity is just one of the options in the Histogram Panel (instead or RGB, Red, …).

• ###### 13. Re: Histogram | pixel position

The luminosity channel can not be directly access by script but you could use scriptlistener to load the luminosity channel as a selection then save the selection to a new alpha channel then get the histogram for that channel. Or create a new alpha channel and use apply image with RGB as the source and normal as the blend mode.