Histograms

This board is for new users looking for some help between the Curvemeister classes.
mikemeister_admin
Posts: 4927
Joined: Fri Sep 20, 2013 8:29 pm

Postby mikemeister_admin » Sat Jul 14, 2012 6:46 pm

Hi there - not sure where to post, I'm not new - but I'm old and my little grey cells are not working properly, so I need help!

I have recently done an HDR program comparison (http://www.broadhurst-family.co.uk/lefteye/MainPages/hdr.htm) - not that very interesting, but it got me thinking (not a good thing at my age), and I realise that I do not understand histograms in detail...

I attach 2 images and histograms (top is RGB and bottom is L) of a normal and light image.

Now each image has exactly the same number of pixels, each of which must have a value...
So why are not the areas shown on the histograms the same size?

I do realise that different programs show different histograms for the same image, but which ever program I check, they do not appear to have the same equal areas - why?

Thanks
Chris
Attachments
salisbury-0ev-jpg
salisbury-0ev-jpg (999 Bytes) Viewed 10939 times
salisbury-2ev-jpg
salisbury-2ev-jpg (999 Bytes) Viewed 10939 times

ggroess
Posts: 5342
Joined: Wed May 24, 2006 2:15 am
Contact:

Postby ggroess » Sat Jul 14, 2012 7:52 pm

Hi Chris,
Simple answer...Because.....

More complex...
The RGB histograms you are showing are composite views of each channel and a "summary" . They are calculated using the RGB color space and it's geometry.  R+G+B = Color pixel.

The LAB Histograms are showing the luminosity values from the L channel only and no account is being made for the A and B values and quite frankly they would not make sense applied to the L channels values.  L+A+B = Luminosity with color.

There are differences in how each is calculated based on the color profile chosen; for instance the sRGB profile will have a slightly different Histo than the ProRGB.  The pixels fit into the space differently.

Remember the Histogram is a distribution of pixels by their numeric values in what ever color space they are being calculated in. They are showing "how many" not "how much" or "where" Their values do show you a relative amount of the image that you will be effecting by changing the values Another way of viewing that would be to use the "curve highlight tool" after selecting a group of pixels in CM.

I think I have this right...This is really Mikes realm...If I have it wrong then I'll need a refresher course...

Greg

leeharper_admin
Posts: 263
Joined: Tue Aug 20, 2013 2:39 pm

Postby leeharper_admin » Sat Jul 14, 2012 8:51 pm

Just to throw something else into the mix - have a look at this Chris: http://blog.zillabyte.com/post/11193458776/color-as-data

Let me know what you think (I've asked Mike whether we can have Hue Histograms in CM4 - we'll see...)

Cheers,
Lee.

mikemeister_admin
Posts: 4927
Joined: Fri Sep 20, 2013 8:29 pm

Postby mikemeister_admin » Sun Jul 15, 2012 8:41 am

Thank you both for your response - and that was a very interesting article Lee. 

I have a feeling at the back of my mind, that there are some colour analysis plot programs around, but it was some years back when I last looked into that area.  There are some people who 'improve' a photo by changing some of the colours to get a more attractive/harmonious balance - typically changing the colour of clothes people are wearing.  I remember helping some of them by introducing them to the power of Lab to isolate and change colours.
Have a look at http://www.websiteoptimization.com/speed/tweak/color-harmony/

Anyway, back to my problem - I have perhaps not explained my problem very well.

Imagine that I have a camera that take images of 10 x 10 pixels and I have some graph paper to plot a histogram on.

A completely black photo will result in me filling in 100 vertical squares at x=0 on the paper.  When I take more interesting photos, I will still have to plot 100 squares on the graph paper, but in different places - BUT I will always plot 100 regardless of how light or dark the photo is or the subject.

Now going back to the 2 images I posted - in no way do the histograms show the same sized areas (i.e. number of filled in squares on the graph paper).
My question is why not

Thanks
Chris

PS. In fact it should not make any difference how many pixels there are on the image, as I'm sure the software will scale the results, so that the histograms look the same regardless of the resolution/scaling (within reason!) of an image.

ggroess
Posts: 5342
Joined: Wed May 24, 2006 2:15 am
Contact:

Postby ggroess » Sun Jul 15, 2012 1:07 pm

I'll nudge Mike on this as well but in the past when this has come up there is a switch in CM that allows you to calculate the histogram "more accurate" it is in the config area.

The purpose of this switch was to calculate the Histogram more "like" Photoshop. (which some say does not calculate the histogram correctly)  Users were always asking why does the CM histogram look so different from Photoshop; so Mike added a feature to calculate it the PS way. 

Who is correct?  probably neither but I think you have to compare apples to apples in that different color spaces use different geometry to find the pixel values and in doing so effect the displayed histogram.

for me the bottom line is...the same number of pixels are being counted each time they are just distributed into different parts of the histogram based on the geometry of the color space...

Greg

mikemeister_admin
Posts: 4927
Joined: Fri Sep 20, 2013 8:29 pm

Postby mikemeister_admin » Sun Jul 15, 2012 3:45 pm

I'm missing something Greg - in the two snapshots I posted, the grey area in the lower histograms (L channel) should be the same size in area, because both images have the same number of pixels (to show in the histogram).  But they are not - that is what I do not understand!
But don't worry about it, I'm sure I will eventually deduce why they are different sizes
Thanks
Chris

ggroess
Posts: 5342
Joined: Wed May 24, 2006 2:15 am
Contact:

Postby ggroess » Sun Jul 15, 2012 6:52 pm

Chris,
Think of it this way....

!0 pixels...
All Black...

1 spiked line 10 pixels high.....at 100% mark.

set that aside....
10 pixels....

2 at 20 %
3 at 40 %
4 at 60%
1 at 100%

Same number of pixels...different distribution.

LAB and RGB are going to calculate the Pixel values differently and the distribution will not "look" the same...
Still trying to help....
Greg

mikemeister_admin
Posts: 4927
Joined: Fri Sep 20, 2013 8:29 pm

Postby mikemeister_admin » Sun Jul 15, 2012 6:58 pm

Hi Lee,

I've been having a look at Hue histograms (although it seems to be present in CM in grey).

One of the problems, is that white, all shades of grey and bright red at all hue = 0 degrees! - so surely we will be confused by the histogram?

What I had thought of trying was plotting Hue against Luminosity, with the values shown as different shades of grey (to denote their value).  Thus trying to show the importance of different colours by tone/brightness.

Had you ever had a look at mytone map idea (http://www.broadhurst-family.co.uk/lefteye/MainPages/c16-brueghelstructure.htm), which I have made into a Photoshop action which you can download from http://www.broadhurst-family.co.uk/lefteye/MainPages/actions_-_4th_year.htm - this seems to be a good way to start to analyse an image and improve it.
However with colour we are easily confused by the surrounding colours - see http://www.broadhurst-family.co.uk/lefteye/MainPages/c16-eop1-next_idea.htm (which shows what I mean).  I therefore do not think that histograms will highlight their importance in the same way as grey-tones.

Just thoughts at the moment - but could you expand on your Hue histogram and why you think it would be helpful and maybe I could write a wee program to test it out.
Chris

mikemeister_admin
Posts: 4927
Joined: Fri Sep 20, 2013 8:29 pm

Postby mikemeister_admin » Mon Jul 16, 2012 3:32 pm

Well I have had a try at a Hue histogram and attach some examples.

The main problem is the way in which some Hue values are so great in each image that it swamps the rest!  I have not found an image where there is not a spike!

Checking it out against CM, it pretty much agrees, so I do not see any gain at the moment.

I'll have to see if I can work in a zoom facility.  But the other thing at the moment is that it is very slow on 12meg images - but if it is a good idea I'll try and do it in the same way as the ColourWatcher and monitor the screen as we curve.

Interesting wee project.
Attachments
hue-rgb-histogram-only-small-images-16072012-160650-jpg
hue-rgb-histogram-only-small-images-16072012-160650-jpg (73.75 KiB) Viewed 10939 times
hue-rgb-histogram-only-small-images-16072012-160307-jpg
hue-rgb-histogram-only-small-images-16072012-160307-jpg (174.8 KiB) Viewed 10939 times
hue-rgb-histogram-only-small-images-16072012-161234-jpg
hue-rgb-histogram-only-small-images-16072012-161234-jpg (143.15 KiB) Viewed 10939 times
hue-rgb-histogram-only-small-images-16072012-162434-jpg
hue-rgb-histogram-only-small-images-16072012-162434-jpg (82.17 KiB) Viewed 10939 times

mikemeister_admin
Posts: 4927
Joined: Fri Sep 20, 2013 8:29 pm

Postby mikemeister_admin » Mon Jul 16, 2012 4:21 pm

Ho Ho - just realised a big (?) problem with showing a coloured scale beneath the histogram
Colours look different depending on Saturation & Brilliance

The attached screen shot with a couple of Hue clocks shows why.
Attachments
huehistproblem-jpg
huehistproblem-jpg (82.66 KiB) Viewed 10939 times


Return to “Help Me! I'm new and I need some help”

Who is online

Users browsing this forum: No registered users and 1 guest