Showing posts with label tones. Show all posts
Showing posts with label tones. Show all posts

Photo Editing Techniques: Levels

Today I'm going to talk about a simple but powerful way to change the appearance of your photos: the levels tool. This post may look long, but that's because there are a lot of images--don't be intimidated! This is fairly easy stuff that can make a huge difference in your images.

The levels tool can be found in most image editing programmes (including my favourites, darktable and GIMP) but for the purposes of demonstration, I'll stick to using darktable only. I will also be using a simple image containing various tones to demonstrate the effects of levels adjustments. I encourage you to download this image and play with it on your own; the easiest way to learn is through hands-on practice:

Right click and save as to download to your own computer.


 The basic anatomy of the levels tool is a box containing the histogram for your image, with a black-to-white gradient at the bottom and a set of three sliders. The levels tool in your software of choice may look slightly different, but it should function similarly. In darktable (and in many other editors), you will also see three eyedroppers; these allow you to move the position of the sliders more precisely (more on that soon).

If you're familiar with your luminosity histogram, the levels tool will probably be reasonably intuitive. The gradient at the bottom represents the distribution of tones in your image--it's sort of a guide to reading your histogram. On the left, you have your darkest tones, in the middle you have your midtones, and on the right, you have your lightest tones.

Adjusting levels in darktable. Click on the image to see full-sized Note that the histogram at the top of this screen capture and the histogram in the levels tool are the same, and represent the distribution of tones in sample image shown at the beginning of this post.

The sliders are used to tell your image processor which tones in the original image should be rendered as pure black, which tones should be rendered as pure white, and where your middle grey should be positioned. Their default positions, therefore, will be at the far left, the far right, and the middle of the histogram respectively.

If you slide your black point slider to the right, the amount of black in the image will increase--anything that was darker in the original image than the new position of your slider will be rendered as pure black. Note that the middle slider will automatically be repositioned in the exact centre between the new black point and the white point. Note also that the histogram for your image (at the top right of the screen) will also change to reflect the new tonal distribution:

Changing the black point (and with it, the mid-point).

 Likewise, if you move your white point slider to the left, all of the tones in the original image that are lighter than its new location will be rendered as pure white. Again, the midpoint slider will automatically reposition itself to the centre between the black and white points:

Moving the white point.

Moving the middle grey slider is a little trickier to explain, but basically, the slider determines which original tone will now be rendered as middle grey. Therefore, if you move the slider to the left, your overall image will lighten (although your black point and white point will not be altered unless you choose to move them), because you are telling your editor that a tone originally closer to black should be lightened to midgrey, and therefore the other tones will also lighten to reflect the new distribution of tones. If you move the midpoint slider to the right, the overall image will darken, as you are telling your editor that it should darken what was originally a lighter tone into middle grey. This is easiest to understand by playing around with the sliders yourself.

Lightening the image by shifting the midpoint.

If you want to precisely place the black point, white point, or midpoint, you can use the eyedroppers. Simply click on the eyedropper associated with the point you wish to change, then click on the area of the image that you wish to place at that point.

So how does this work in colour? Let's play around with two examples. First, a colour distribution:

I encourage you to also download this image for practice.


Let's try moving the black point...

Shifting the black point.

...and now the white point...

Shifting the white point.

...and now the midpoint...

Shifting the midpoint.

...and now all three points:

Shifting black point, midpoint, and white point.

See how the levels tool can dramatically alter the look of your image?

Finally, let's play with a real-world example:

A Nova Scotian sunset.

See what happens if we shift the black point?

Moving the black point.

What about if we shift the white point?

Moving the white point.

And finally, what if we move the midpoint?

Moving the midpoint.

The levels tool is just that simple. And, to make life even better (at least in darktable), adjusting your levels will adjust your image in real time, letting you tweak it exactly to your liking. It's an easy tool that makes a powerful difference.

Two Camera Settings That Will Instantly Improve Your Fibre Photos (Probably)

I know, it's kind of a click-baity title, but it's also likely true. If you shoot in anything other than full manual and raw, you need to know about these two settings. And if my very cheap smart phone camera has them (it does--I checked), your camera probably does, too.

Ready?

1. White Balance

Our eyes and brains do a great job of adapting to whatever colour of light that we see in order to make an object look basically the same under a variety of light temperatures. Unfortunately, our cameras are not so smart. If you take a photo of a white swatch in daylight, it'll generally look about the same in the image as it does to your eyes. However, if you take the same photo under incandescent light, for example, your image will take on a distinct orange cast:

White yarn under tungsten (incandescent) lighting, auto WB.

 Thankfully, there is a solution: setting your white balance. Basically, the white balance setting lets you tell your camera what kind of light you're shooting under, so the camera can compensate for the colour of the light and give you a photo that doesn't have an ugly colour cast. Instead, your photo will look basically like the scene did to your eye. Auto white balance will often do a good job, but in some situations, you'll want to input it manually. Check your manual for how to set it correctly, because it's different on different cameras.

If you forgot to set your white balance and you have a photo with a significant colour cast, all is not lost. Many (most?) post-processing programs have a white balance editor. Often the easiest way to use this is with the eyedropper/click method. Find the eyedropper option under your white balance and then click an area of the photo that should be a neutral colour. I find that if I have a person in the photo, the white of one eye is often a good spot to select.

Same swatch. White yarn under tungsten lighting, custom WB applied.

What happens if you're shooting in mixed lighting--for example, with window light and incandescent light? Well, unfortunately, the colours don't just magically mix and average out to one colour (they might do this to a degree if they are coming from approximately the same location, but it will still be imperfect). So you can make a choice and choose your balance for one colour of light, but part of your image will likely have a (probably ugly) colour cast to it. Or you can eliminate one of the light sources and balance for the other--a much better option, but not always possible. Alternatively, you can shoot later, or somewhere else--or you can override the entire ambient light with an external flash unit, but I only recommend doing the latter if you're confident you can do it well.

If you're shooting in raw, I probably don't need to tell you this, but it doesn't matter what white balance you choose--you will set it anyway in post-processing. That said, setting it to approximately the temperature you want may give you a more pleasing in-camera image preview. I usually leave mine set to auto because it is adequate, and because I'm lazy, and then I correct it in post when necessary.


2. Exposure Compensation

Are your photos too dark or too bright? You've probably under- or overexposed. Although a bit counter-intuitive, photos with a lot of white or light-coloured areas will tend to be underexposed (too dark), and photos with a lot of black or dark-coloured areas will tend to be overexposed (too bright). This is often a problem in winter scenes containing a lot of snow, in close-up shots of particularly dark or light yarn, in images which include the sun or another a light source, or when there are a lot of deep shadows. It occurs because the camera sees in shades of grey, and when it is determining exposure, it wants to turn everything it sees into middle grey.

So if you take a picture of a white swatch using automatic exposure, it'll come out a dingy grey (underexposed) instead of a very light grey with white highlights (which the eye would 'read' as white):

No Exposure Compensation
(Aperture-Priority AE, 1.3s, f/7.1, ISO 100)
The actual swatch is white.

Conversely, if you let the camera automatically expose for a very dark blue swatch, it will instead render a more middle blue colour (overexposed), giving you an inaccurate representation of the item:

No Exposure Compensation
(Aperture-Priority AE, 15s, f/7.1, ISO 100)
The actual swatch is navy blue.
There is an easy fix for this. Check your camera manual and find out how to set your exposure compensation. If your photo is underexposed, move the exposure compensation toward the positive (+) side. If you are trying to portray a very light knit or crochet item accurately, you will probably need to use positive exposure compensation:

+2 1/3 Exposure Compensation
(Aperture-Priority AE, 6 sec, f/7.1, ISO 100)
Same white swatch; same location; same lighting.
If your photo is overexposed, move the exposure compensation toward the negative (-) side. If you are trying to portray a very dark knit or crochet item accurately, you will probably need to dial in negative exposure compensation:

-1 1/3 Exposure Compensation
(Aperture-Priority AE, 6 sec, f/7.1, ISO 100)
Same navy swatch; same location; same lighting.
So what happens if you want to shoot a scene with both very light and very dark areas? Well, you might not have a problem at all. If you examine the shooting information for the two accurate exposures above, you'll notice that they are identical--both the accurate white swatch and the accurate blue swatch, which were shot in identical locations under identical lighting, were exposed for 6 seconds, at f/7.1 and ISO 100. A test shot containing the two swatches confirms that the camera's dynamic range is fully capable of exposing correctly for both swatches and that in this case, its metering of a more balanced scene will be fairly accurate:

No Exposure Compensation
(Aperture-Priority AE, 5s, f/7.1, ISO 100)
Same swatches; same location; same lighting.

You may find yourself in a situation where you simply can't capture the full range of tones, however--in bright sunshine with deep shadows, when including a direct light source, with bright snow in the background--any number of scenarios. You have a few choices:
  1. Expose for whichever is more important: either for the brights/highlights, using positive exposure compensation, or for the darks/shadows, using negative exposure compensation
  2. Expose for the middle, (probably) using no exposure compensation, and possibly losing some detail in both your highlights and your shadows
  3. Use bracketing (and a tripod, if at all possible) and combine the images in post-production (beyond the scope of this entry; you can start with a google search for "HDR photography" if you're curious
  4. Use an in-camera HDR function, if your camera has one
What if you're shooting in full manual? You can manually compensate. If your photos are underexposed, instead of shooting with the light metre centred, shoot with it towards the positive side. If your photos are overexposed, shoot with negative exposure. Easy!

How do you know if you have exposed properly? Check the histogram when you review your images (I'm starting to sound like a broken record, but check your camera manual if you don't know how to do this). When in doubt, expose to the right--it's easier to darken the image without degrading quality than it is to lighten it. No idea what I'm talking about? Check out my post on histograms by clicking here.

White balance and exposure compensation: your new photographic best friends!

Introduction to Exposure: The Luminosity Histogram (with Bonus Blinkies)

I have the plague (a.k.a. a particularly nasty head cold) so I'm taking a break from my one skein challenge. I'm itching to get the camera snapping, but I cough when I move, so the couch has my name on it. That means no new fibre-y photos for this post. Oh well. You'll have to make do with some recent shots of a nice single malt Scotch instead. That's almost as pretty as yarn, right?

So, now that you've learned about how the camera exposes images, you need to be able to judge the quality of your exposure. To a degree, simply looking at the image will give you a rough idea of how it has been exposed. The problem, however, is that camera screen brightness and the brightness of your surroundings can have a major impact on how the image appears during camera playback. An image on a bright camera screen might look overexposed when, in actual fact, it is dramatically underexposed. Fortunately, there is a better way. Enter the luminosity histogram. (Don't worry, this isn't high school math, nor do you need to know high school math. I promise, this is pretty easy stuff once you get the hang of it). There are also RGB (red, blue, and green) histograms available to you that give you information about the individual colour channels in your image, but here I'll only be discussing the luminosity histogram.

Here's the quick version:

The luminosity histogram is a depiction of the tones in your image. Tone basically describes how light or dark a given colour is, ranging from pure black to pure white. Midtones are, as expected, in the middle. The luminosity histogram shows you the distribution of tones in an image from dark (left side of the histogram) to light (right side of the histogram). If the histogram is tall in the middle, it means that there are a lot of areas of midtones in the image. If the histogram is bunched to the left, it means that the image is very dark. If the histogram is bunched to the right, it means the image is very light. If there are spikes at both ends of the histogram and a dip in the middle, it means that there are many pixels that are very dark in the image, and many pixels that are very light in the image, but very few pixels that are in the midtone range.

The ideal histogram is one that reflects how you want the image itself to look. It's that simple. If you have a lot of light tones in the image and you want them to look light, you want your histogram to skew to the right. If you have a lot of dark tones in the image and you want them to look dark, you want your histogram to skew to the left. And so on.

Most cameras will let you turn on the histogram in playback mode. Check your manual for how to do this. If you take a quick glance at the image after you shoot it, you'll get a pretty good idea of how it's exposed. Another option most cameras offer is a highlight clipping warning, more commonly called "blinkies". If you turn this on, any parts of the image that are pure white (and therefore contain no detail--blown or clipped highlights ) will flash on your screen. This leaves you free to judge whether you need to retake the image because you overexposed, or whether those highlights should, in fact, be clipped (such as if you shot into the sun or another bright light source).

That's the (relatively) short version. Still with me? Let's take a look at some examples in more detail.

1/100, f/2.8, ISO 400

Here we have a nice glass of Scotch, in a nice bright setting. Notice the lack of dark and black areas in the image, and the abundance of light areas. Now let's look at this image with its histogram (click to enlarge if you're having trouble seeing the histogram properly).


See how the histogram bunches to the right-hand side and is empty on the left-hand side? This reflects the absence of darker tones in the image. The large spike to right of the image reflects the light-coloured background. The small hump near the middle of the histogram reflects the midtones in the image--the Scotch and its glass.

Let's look at the histogram for the same image after converting it to greyscale to make the tones a bit easier to perceive.


Note that the histogram is essentially identical (some slight differences due, as far as I can tell, to the nature of the conversion process). Again, there is an absence of dark grey or black tones, and a preponderance of light grey tones, and, therefore, the histogram is skewed to the right. The glass and its contents (especially the right-hand side) is more of a light-middle grey but takes up less relative space in the image than the lighter background, so the hump on the histogram that represents the midtones is smaller than the peaks representing lighter tones.

Let's look at another example. Here's the same glass of Scotch, in a somewhat moodier setting.

1/80, f/2.8, ISO 1600

I intentionally underexposed this image because I wanted all but the highlights of the Scotch to disappear into shadow. What do you think the histogram will look like? Let's see.


As you probably guessed, this histogram is heavily skewed to the left. In fact, you can see from the straight left edge that many of the pixels actually touch the left boundary of the histogram, meaning that they are pure black and have lost all detail. The small tail on the right of the histogram represents the parts of the image that are dark- to midtones--specifically, the whiskey, and the highlight on the rim of the glass. Again, let's take a peek in greyscale.


Sure enough, we have a mostly black image with small areas of dark- and mid-grey.

So what does the histogram of a correct exposure look like? It depends.

First of all, the only "correct" exposure is one that reflects what the photographer intended. So if I were trying to show all of the details of the Scotch's surroundings in the second image, the exposure would be incorrect--I lost much of the detail in shadow. However, because that was the effect I wanted, the exposure is correct for my purposes.

Let's take a look at a more classically-exposed image, with a larger range of colours and tones (not a great photo, but useful enough for the purposes of example).

1/100, f/5.0, ISO 12800 (no, I don't know what I was thinking either)

So what do we expect to see in the histogram? Well, we have a nice wide spread of tones. There are some very dark tones in the bottle behind the glass, and some highlights where the sun was peeking in through the curtain, but there are also a lot of tones in between the two extremes. Let's take a look at the histogram.


Sure enough, the histogram reflects the wide tonal range. This is something like what the histogram of a correctly-exposed image will often look like. But if your histogram doesn't look like this, that doesn't mean your image is wrong; it simply means it's different. Whether it fits your purpose is what matters. If, for instance, you have a lot of snow in the background of your picture, you will probably hope to see a nice spike at the right of your histogram--perhaps even a peak of pixels encountering the right boundary that are pure white. If you are showing off a nice black shawl, on the other hand, you will probably hope to see a nice spike at the left of your histogram. If you know the effect you're going for, and can approximately gauge the important tones in your scene, you can get a pretty good idea from your histogram of how your exposure looks, regardless of the brightness of your camera screen or the level of ambient light around you. Cool!

One last thing--let's talk a little bit more about clipping. I touched on it above, but basically, clipping is what happens when parts of your image are outside of the recordable range of tones or colours. This means that there is no image detail in those parts of the picture; in the case of clipped dark tones, for example, any pixels in the clipped area will appear as pure black (even if there was detail visible to the eye at the time of shooting); likewise, clipped highlights will appear as pure white. If you try to shift the exposure a bit in post-processing, or try to recover detail in highlights and shadows (a fairly common procedure, especially when processing raw files), there won't be any detail in those areas to recover.

If you have a flat edge on the left or right boundary of your histogram, it probably means that you have lost detail from the shadows or highlights. This doesn't necessarily mean there is anything wrong with your picture. As mentioned above, I intentionally underexposed and lost details in my shadows in the darker image of the Scotch. Clipping is, however, something to be aware of. To help you out, most cameras will offer you highlight clipping warnings--more colloquially known as "blinkies" or "zebra stripes". Check your manual to learn how to turn on this feature. If you turn on this warning and you have blown highlights in your picture, the playback image on your camera will look something like this:


Note the flashing red areas of this image. These are areas where the highlights have been clipped. Looking at the playback image, I could decide if I wanted to reshoot the image with a darker exposure to try to recover detail in those highlights, or if I was comfortable letting those highlights blow out. The highlights in this image are a few bright spots of light from the sun, so I was happy to leave them as they were. If, on the other hand, I were shooting a pair of white socks and I was getting blinkies somewhere on the socks, I would probably want to reshoot with a darker exposure so as not to lose important detail.

The luminosity histogram takes a bit of mental work to get the hang of, but once you understand it, it is an invaluable tool in your photographic arsenal. Now go forth and practice--and maybe drink some Scotch for me, because my bottle, as of earlier today, is sadly empty.