Downloaded from www.biorust.com on Thu Feb 09, 2012 11:00:06

 
Understanding Levels
Tutorial Author - Zapphnath (http://forums.biorust.com/member.php?userid=11761)

Although gifted with a relatively easy-to-use interface, there are some features of Photoshop which seem to baffle the vast majority of casual users.  One such feature is the 'levels' control dialog, which outputs an area-based histogram of color usage in a given source image.  Far from being voodoo, however, manipulating levels is a very powerful way to quickly improve an image's tonal range and color balance without losing fine detail control.  In this theory-based tutorial you will learn how to interpret levels, understanding the way they work, and come to an understanding of how mastery of Levels functionality will make you a superior-level Photoshop user.



Basic Levels Orientation
First, let me explain a little something about Photoshop, itself: Photoshop is, basically, a mathematics-based application. It doesn't "see" images or colors, like we do. Photoshop looks at an image as a series of numbers that represent the greyscale channel for each color. Every pixel is given a set of numbers that correspond with it's greyscale value in each of the channels. So, in RGB mode, if a pixel is pure black, it would be represented as 0,0,0. Pure white is 255,255,255. Look familiar? If you're the type who likes to choose colors by the numbers, as opposed to visually, you'll recognise the pattern, I'm sure.

Now, let's move on to Levels: If you open the Image > Adjustments > Levels dialog, the first thing you will notice is the strange graph in the center. This is called the Histogram and it's there to give you a visual representation of the levels of luminance of your image. This is the lightness or darkness of the pixels in the image and has little to do with color. Of course, colors like yellow, sky blue or pink have a high luminance value and are affected by any adjustments made, but you're not adjusting the color, itself, only it's luminance. Just above the Histogram are three little boxes and just below it are three little arrows. You'll see the numbers in the boxes change as you move the arrows and, as you become more acquainted with it, you may find yourself just entering numbers into the boxes to quickly get to what you want.

Fig.01 shows the dialog, with a few extras added to illustrate what I'm talking about. The red arrows show the connection between the various slider controls and their corresponding boxes.

Still in RGB Mode, you can see that the default position for the black arrow is "0" and, for the white one, it's "255". These arrows represent absolute black and white, with black being "completely devoid of luminance" and white being "100% luminance". In the default position, there are 254 units of measurement (i.e. 'Levels'), between absolute black and white. "1" is near-black and "254" is near-white and so on. The Histogram shows each level as a vertical line and it's height represents the amount of pixels with that level of luminance in the image. The taller the line, the more pixels there are with that Level. When it looks like a wave with solid black and white from end to end, that tells us that there are most or all levels present. If you were to make a severe adjustment and close the dialog, then open it again, you would see blank spots in the histogram. These represent the levels that are missing. Fig.02 shows the Histogram before and after with the red arrows representing the changes that were made.



Simple Level Adjustments
When you first open the Levels dialog, if the Histogram is "incomplete" - the black area doesn't stretch from one end to the other - this tells you that the Contrast of the image is wrong. There are no blacks and/or whites, depending on what's missing from the Histogram, so the image appears bland. Simply adjust both the black and white arrows until they line up with the ends of the graph in the Histogram. This "quick fix" will bring out details, both in the shadows and on the highlight areas, and may be all the adjustment an image needs. You can do this on every image, without ever really knowing what it's actually doing, and always have perfectly acceptable results. (Note: I said "acceptable". Having a better understanding of the tool will yield better results). Fig.03 shows an image that has been adjusted in this manner. You can see, by the red arrows, how the black and white ones were adjusted to line up with the ends of the graph. Notice how much of a difference this minor adjustment makes to the overall contrast of the image? The shadows are much deeper and the highlights are stronger. It simply looks better!

So, what do Levels adjustments do to your image? To answer that, let's start with the little black arrow. Click on the arrow itself, and slide it to the right until the number in it's corresponding box reads "20", (or simply type "20" into the box). You'll notice that the image gets darker. What has happened is that you've changed the position of absolute black. You may be thinking that absolute black has replaced all twenty of those levels of near-black but, actually, when you moved the slider, the levels in between black and white were recalculated and, now, there are only 234. Twenty levels were, indeed, removed, but they were removed evenly across the whole spectrum - approximately every 13th level was lost. If you move the white slider to the left, the same thing occurs, except that you're re-assigning the position of absolute white and lowering the amount of Levels in between. Remember, once you hit the OK button, those levels will be gone and can't be brought back without a lot of "Undo" actions. As with any adjustments, if you can make them using an Adjustment Layer, which you can get by clicking the half-black/half-white circle icon at the bottom of the Layers Pallet, you won't be changing the actual image - or, "damaging the pixels", as it is called - and always have the original, untouched image right there in the Layers Palette. At the very least, you should do your adjustments to a duplicate layer and leave the original intact.

You've probably noticed the little grey slider in between the black and white ones. That, of course, represents the position of 50% grey within the spectrum. As you adjust this slider, you can fine-tune the luminance even more. By moving the grey slider, or "Gamma", as it is sometimes called, you can adjust the contrast without re-assigning or affecting absolute black and/or white. The number that represents this arrow in the little box above the Histogram is different from the other two. While the corresponding boxes for the black and white arrows show the position of the arrows along the spectrum, for the grey arrow, the number represents it's position relative to the other two. You'll notice that, as you move the black and white arrows, the grey one moves as well, attempting to stay in the exact center of the other two, but it's number doesn't change. It stays at 1.00, it's default position. As you move the grey arrow, itself, the number changes to show how much above or below the center you are. When you move the gamma towards the black end of the spectrum, you reposition 50% grey so that the levels between absolute black and 50% grey are recalculated so that many are removed and those between 50% grey and absolute white are stretched out to fill the empty space. This is why moving the gamma towards the black end actually lightens the image. The opposite is true for moving towards the white end - light levels are removed and dark levels are stretched to fit, resulting in an overall darker image.



The Eyedropper Tools
There are a set of "Eyedropper" icons on the right side of the dialog (see Fig.01 again) and they are in the same order as the sliders: black on the left, grey, then white. The black eyedropper allows you to assign the level of "0" - absolute black - to replace the original level of whatever pixel you click on in the image. All of the pixels in the image that are the same level of luminance as the one you clicked on would, then, become absolute black and the rest of the levels would be recalculated. Overall, the image will become a little darker, with the most noticeable changes occurring at the darker end of the spectrum. For instance, if you have an image that makes you think, "Hmm, this greyish area should be black", then you can simply click the black eyedropper, then move your cursor out into the image, itself, and click in the grey area to automatically make it black. Of course, the white and grey eyedroppers work in a similar fashion in their respective areas of the spectrum. Fig.04 shows an image and some examples of the changes made when using the black Eyedropper. The red dots indicate where I clicked to get that result. Notice how, in the bottom one, clicking in the relatively light area of the roof resulted in a much darker image than clicking on the shadow area or the already dark window of the other two examples.


Other Features
Something worth mentioning is the Auto button, also on the right side of the dialog. This does the same thing as the Image > Auto Levels command, except that you can adjust the sliders, afterwards, if the results aren't exactly what you wanted. Of course, as with most of Photoshop's dialogs, if you hold the ALT key (OPT on the Mac), the Cancel button becomes a Reset button that'll let you start over without having to close and re-open the dialog. It's worth the effort of trying the Auto command because the results can be surprisingly good, sometimes. If you're not happy, simply Reset.

You're not limited to controlling just the overall luminance. If you click at the top of the dialog, where it says "RGB", you can choose any of the color channels and manipulate them one at a time. This is a highly effective option, (or "alternative", if you're using a PC... hehe!), when you're trying to correct the color of an image. This works similarly to, but more effectively than, the Edit > Adjustments > Color Balance dialog - the opposite of red is cyan, the opposite of green is magenta, and, for blue, it's yellow. So, when you choose the Red channel from within the Levels dialog and move the Gamma slider towards the black end, the overall image becomes redder. Moving to the right, towards the white end, makes the image more cyan. The Green and Blue channels work the same way.

Using Levels, as opposed to Brightness/Contrast, offers a great deal more control over the contrast of your image. Why? Because Brightness/Contrast changes the luminance of all of the pixels in the image at once and Levels allows you to change only the areas of the tonal spectrum that you want to change, independently from the rest. Once you begin using Levels, you'll probably never open Brightness/Contrast again. Once you're comfortable with Levels, you can move up to Curves, which is as much a step above Levels as Levels is above Brightness/Contrast.

One last thing before I wrap this up: the black-to-white gradient-colored box, at the bottom of the dialog, is for overall adjustments (see Fig.01 again). Like Brightness/Contrast, adjustments are made across the whole spectrum. However, using this tends to lower the overall contrast of the image. Sliding the white slider to the left will darken the image, instead of brightening it, like the other white slider but, instead of re-assigning absolute white and re-calculating the rest, it simply makes the value you place the slider at be the brightest value in the image, eliminating all of those levels between the original and new positions. At this point, there will no longer be any white pixels in the image. Moving the black slider will brighten the image and eliminate the darkest levels. Most times, anything other than the finest adjustment made here will result in a poor quality image. It does have it's uses, however: if you have an image in which you want there to be no pure black and/or white, this is, probably, the quickest method to get that result.


Taking It Further
There are many uses for the Levels adjustment dialog other than controlling the contrast of an image. It's almost a necessity when trying to create masks from channels. It can be used to crisp up a blurred edge in a black and white image. By blurring, then using the Levels dialog, you can make adjustments to layer masks. As stated above, it can help with color correction. Like anything else Photoshop-related, don't limit yourself to what you think a particular tool is supposed to be used for. Think about how you can use the 'Add Noise' and 'Motion Blur' filters to simulate rain or wood grain - a feat that neither one was specifically designed for - and you can see what results can come from thinking "outside of the box".

Well, there are still a few aspects of the Levels dialog that weren't covered here, but this should give you enough of an understanding to be able to extrapolate the rest on your own. Sorry there weren't more pretty pictures to look at, but this tutorial is more about the information provided than about aesthetics. I'll try to put lots of colorful images in my next tutorial. Promise!




All Content © BioRUST 2012 All Rights Reserved.