dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Photo Levels Manipulation Tutorial

  1. #1
    Senior Member RUSHVision's Avatar
    Join Date
    Dec 2000
    Location
    Pacific Northwest
    Posts
    5,441

    Photo Levels Manipulation Tutorial

    ________________________________________________

    Photo Correction Using Levels

    In the following tutorial I will be using the Levels dialogue to correct lighting differences in a composite of several photos that were stitched together. The first image below shows the original composite and you can plainly see where the separate images were pieced together. In addition to some simple tonal differences where parts of the image are darker than others, there are also a few other details that don't quite match up. Fixing all of these things is actually a fairly simple matter. Let's take a look at how it can be done.



    The obvious place to start for me was the darker vertical section to the left of center. I was going to have to make a fair number of adjustments to this part of the image so I dragged a rectangular selection around the entire darkened area and copied it to another layer. I began by using the Levels dialogue to bring that section's light values in line with the rest of the image. There are some other manipulations that need to be done, but that is what is wrong with most of this image...parts of it just need to be either lighter or darker. Adjusting the Levels makes this easy so all that remains is to be able to create the selections on which these adjustments will be made.

    The first Levels adjustment I made was done using no selections at all, so the adjustment was applied to the entire layer. By doing this I noticed that more than one operation would be required to match all the edges of that section. So I began by making the top portion match the adjacent areas then hit OK to apply the changes.

    Let's take a look at the Levels dialogue. I'm not going to go into great technical detail as to exactly how every aspect of this dialogue functions, but rather I'm going to attempt to present to you what this thing can do for you in a more practical and useful way by keeping things relatively simple.

    The Levels dialogue can be accessed by going to Image>Adjustments>Levels or by hitting Ctrl+L. It looks pretty confusing and mysterious, but once you understand how it works it will become one of your best friends. By adjusting the indicated sliders you can manipulate the tonal range and color balance in an image with a very fine degree of control. Let's start at the top and work our way down. When you first open this dialogue the default Channel is always going to be RGB. This is going to affect all three channels simultaneously.



    Alternately, you can also choose to make modifications to each channel separately. You will probably end up using RGB most often, but most photographs can benefit from a little selective adjustment of individual channels. Take some time and play around with the sliders in each of the channels to see what affect they have on the image so the next time you see a photo with a yellow cast you will know that all you have to do is go in and do some level tweaking to straighten things out.

    The boxes next to where it says 'Input Levels' correspond to the sliders marked A, B and C. You can input numbers here directly or just use them as a reference as you drag the sliders around. The histogram pictured below them shows you how the pixels in the image are distributed across the light/dark spectrum. Your highlights are found on the right, shadows on the left, and midtones in the middle. The histogram shown in the image above represents the original composition and as you can see, it's coming up a bit short in the highlights department. To correct this you would move slider 'C' over to the left towards the bottom of that black ramp.

    Let's talk now about how each of those sliders will affect your image. Slider 'A' controls your shadows. If you slide this over to the right it will take all the darker pixels in your image and make them even darker. The opposite if true with slider 'C'. Pushing this over to the left will make all your highlights brighter. Slider 'B' in the middle allows you to adjust the midtones. If you want to increase the contrast in an image then you can push the outer sliders towards each other to give greater intensity to both shadows and highlights. This is much the same as using the Contrast dialogue, but it gives you much greater control.

    The Output Levels on the bottom work the same as the Input Levels in that the boxes on the top correspond to the sliders below. You can check Adobe's official help file for more precise info, but one way to think about how these work is that each slider specifies the full intensity of either the shadows or the highlights. Slider 'D' on the left represents the shadows. Moving this to the right...over towards the white slider...will brighten all the shadows. Slider 'E' on the right will naturally have the opposite effect.

    Just in case that didn't quite sink in, here's another way to think about it. At the default position for these sliders, blacks will be full-on black and whites will be as bright as they can possibly be. By moving these sliders in, you are saying that you don't want your blacks to be any darker than this amount or your whites any brighter than that amount. If you had a black and white image...let's say a chess board...moving slider 'D' would make all your black squares start to turn grey and moving slider 'E' would make all your white squares turn grey. Does that make sense?

    One of the primary uses of this function is to properly map shadow detail for printing, so those of you doing strictly web graphics might not use these two sliders that much. It can still be handy to know how they work and what they do and they have other uses, so here's another opportunity to play around and see what they do to your images.



    The image above shows the result after I adjusted the Levels for the whole section. The entire seam on both sides will be gone over with the Clone Stamp Tool to improve the blending, but the arrows point out areas that will require additional manipulation.

    Before we go on however, let's take a look at how I did the masking for my Levels adjustments. For the initial adjustment, I worked on getting the top part of the section to match the surrounding clouds then worked my way down. For my next adjustments I used a Layer Mask to isolate a progressively smaller portion of the image.



    The Quick Mask button can be found on the right under the color swatches on the toolbar. To create the mask pictured on the right I first Ctrl-clicked on the layer containing the modified section to load that as a selection. I then entered Quick Mask Mode and that area was excluded from the mask. The hard edge on the right is a remnant of this operation. I then used a big soft brush to paint black on the areas that I wanted to add to the mask. Exiting Quick Mask Mode creates a selection based on the portion of the image not covered by the Quick Mask. This is done by hitting the button next to it.



    Below we have the completed section which has now been merged with the background. I have also used a layer mask similar to the one pictured above combined with the transform tools to pull the bottom right corner down so it matched the rest of the image. I just masked off everything below that fellow in the yellow shirt and then hit Ctrl+T to access the Free Transform Tool to pull that corner down. The funky pole shadow was cloned out as well with plans to just create a new one instead of trying to fix what was there. Before I did this though, I used the Eyedropper to pick up a color from the shadow and then used the Lasso Tool to quickly create a replacement shadow in a new layer. This was blurred a bit and the opacity taken down to let just a touch of the background show through. I can't say for sure if that woman on the left ever had a shadow being cast on the ground or not, but based on the angle and length of all the other shadows I decided that she should have at least a small one so I used the same technique to give her one as well. For the young man on the bottom left, I just picked up a color from what was present of his existing shadow then painted in the missing bits. It's probably not entirely accurate, but it no longer catches the eye with an obvious break. So with just a bit of cloning, transforming and tonal tweaking we were able to correct all those seemingly nasty flaws.



    This last image below shows the changes described above and I also did some additional Levels adjustment primarily to the top and right side. Again selective masking was used to affect only the areas that needed it. The entire photo gains clarity by simply highlighting details that are already present in the image and providing a higher level of contrast to portions that appear dark or washed out. I have stacked the original on top for comparison.




    So there you have it. Once you get a taste for how useful it is, using the Levels dialogue will become a regular part of your Photoshop routine.
    mrush


    > .. _ .: Join the FK ARENA!:..:RUSHVision vs. JWin:. _ .. <
    ..:: "Why aren't the lockout programs working?!?...Release the monkey!" ::..

  2. #2
    2008 Man of the Year JWin's Avatar
    Join Date
    Aug 2005
    Location
    here
    Posts
    768
    Dang rushy, way to take a simple tutorial and really take it to the next level. Everyone who hasn't used level adjust, read this and start using it. You just may wet yourself when you realize how much better things can look with just slight tweeking.

    SAMedia Blog (general bs) :: jwinmedia (my music site)
    "Think of an advertisement where the product you're marketing is Jesus!"
    -From a work for hire ad

  3. #3
    Senior Member RUSHVision's Avatar
    Join Date
    Dec 2000
    Location
    Pacific Northwest
    Posts
    5,441
    Thanks, JWin. I actually did this for the member who was asking about the rust effect a little while back. He's got a bunch of these stitched up photos on his site so I thought this might be helpful.
    mrush


    > .. _ .: Join the FK ARENA!:..:RUSHVision vs. JWin:. _ .. <
    ..:: "Why aren't the lockout programs working?!?...Release the monkey!" ::..

  4. #4

  5. #5
    He has risen! lefteyewilly's Avatar
    Join Date
    Mar 2001
    Posts
    2,597
    hey rush, i was piecing together a pano just today, and i read this...and it made it go a bunch quicker. Awesome tutorial man! Thanks!

  6. #6
    Senior Member RUSHVision's Avatar
    Join Date
    Dec 2000
    Location
    Pacific Northwest
    Posts
    5,441
    Thanks, lefty.

    I probably should have included one more image that showed what things looked like after the first level adjustment on that one section while it was good on the top and still dark on the bottom, but I think the information about the Levels dialogue itself is the real 'meat' of this tut so that's the part I concentrated on the most.
    mrush


    > .. _ .: Join the FK ARENA!:..:RUSHVision vs. JWin:. _ .. <
    ..:: "Why aren't the lockout programs working?!?...Release the monkey!" ::..

  7. #7
    Senior Member
    Join Date
    Oct 2003
    Posts
    901
    hey rush, thanks for all the tuts. why dont you put all your tuts Links in the tutorial sticky above. So we can always find them

  8. #8
    Senior Member RUSHVision's Avatar
    Join Date
    Dec 2000
    Location
    Pacific Northwest
    Posts
    5,441
    I was thinking about that. I might get around to it one of these days.
    mrush


    > .. _ .: Join the FK ARENA!:..:RUSHVision vs. JWin:. _ .. <
    ..:: "Why aren't the lockout programs working?!?...Release the monkey!" ::..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center