Short PSP Tutorial for May 30, 2002
|The histogram is useful because it shows the distribution
of pixels in an image. We will use it with greyscale or lightness so that
we can see the tonal values in an image, that is the amount of pixels or
percentage of pixels in a given tonal range. Think of Tonality as Contrast.
From Darkest, a value of 0 on the left hand side, to Lightest, a value of 255 on the right hand side, the bottom horizontal line represents this range.
When you have an image open, there are humps and or spikes in the histogram. The vertical values on the graphic correspond to the the amount or percentage of pixels that correspond to a tonal value between 0 and 255.
The histogram, at its simplest, gives us an idea how we can adjust the contrast or tonality of an image.
Let's explore some basic images and start thinking about histogram as it relates to images.
In the image below, On the top left panel, focus on the all black image with the white text. Forget for a moment that the text is there. Think of this as an all black image. Then note the part of the histogram on the right side of it. Note where there is a spike in the histogram at about 0.
All the pixels are clustered in that spike at the very far left side. This shows that all the pixels in the image are black only. There are no other spikes or humps on the histogram.
Now look at the bottom left panel, the all white image. (forget the text is there) Note the spike on the histogram on the its right. All the pixels in the image are represented by a spike at 255. They are all white!
On the top right panel, in the image with the black and white panel, what do you expect to see on the histogram? Make a guess then create an image in PSP that is half white and half black. Look at its histogram and see if guessed right.
On the bottom right panel on this image see the gradient circle image.
What do you expect to see on the histogram? Again make one like it in
PSP and view the histogram.
|Now let's go onto a real world example and see what useful information we can glean from the histogram to help us correct the contrast (tonality) in the image.|
Right click and save the image on the left, Cleome.jpg then open in PSP to use as an example.
I took this image with my Canon D-30 camera.
It is really good about not blowing out the whites in an image but it tends need a good fix in PSP.
Let's look at the histogram for Cleome.jpg (See below)
On the top Panel, notice I have shaded the right half of the histogram. On the right side of the dialog box, where the values are discussed, note that for the values highlighted, from 45 to 255, 50 percent of the pixels fall in that range and 50 percent fall below that range. 45 is the median value.
In the Middle Panel I shaded the values from 0 to 45 on the left side. Approximately half the pixels are in this range, dark.... Looking at the image itself, you can see this is true. The image is, overall, very dark.
In the bottom panel, below, I highlighted the section where the graph line meets the horizontal line. See the values represented as 203 to 255 return 0.0 percent and only 3 measly pixels in this range.
|On to Corrections...
Since the flower I see outside is bright white, I can safely push the lightest values in the image to 203 without blowing out the highlights, the whitest lightest parts.
Blowing out means to turn all the pixels white.
Let's use levels to illustrate this.
What I do is apply a levels layer to improve the tonality. From the layer palette, right click on the background layer and pick New Adjustment Layer > Levels from the fly out box.
On actual levels dialog box, grab the right hand slider and pull it down to 203. See the right panel in the image below for the levels box then the left panel for the change in the image.
In the histogram window below, the whole graph has shifted to the right. There are bright whites in the image like there should be. The median value has increased from the original 45 to 55.
Still however, the darks are way dark! Let's lighten the midtones a bit more. The histogram shows us a pretty smooth curve in the dark areas still, so we have plenty of pixel information to work with.
|To improve the Midtones, those values in the middle range
of the image, reopen the Levels layer by double clicking on it in the layers
palette. The beauty of using an adjustment layer rather than just levels
is that you can endless fine tune the adjustment layer where the plain levels
adjustment is a one shot deal.
As shown below, grab the midtone slider, the middle diamond, and pull to the left to a value of about 1.26.
The middle tones are expanded or lightened, revealing more of the detail in those darker tonal ranges.
Note the Layer properties Adjustment tab on the right side of the image for my settings.
Look at the Histogram for the revised image below. All the darker range pixels have been redistributed to the right a bit. The median value, where half the pixels are darker and half are lighter is now up to 74 from the original 45.
This is as far as I would take this image. The contrast is OK now and the pixels are well distributed along the histogram.
All Tutorials and Tips including images and text