This article is mainly addressed to those new to photography, although may be useful for more advanced photographers.
There are plenty of articles written on curves today, but at the same time not enough. Most of these articles are about Curves tool in Adobe Photoshop. But curves themselves are much broader and important term. Although it is really easier to study how they work in Photoshop, it should be comprehended that curves are integrated in almost any photography software, one way or another. Even if you do not see familiar instrument, it probably exists and affects image. Even when you adjust Brightness or Contrast in Lightroom, you are actually control some kind of curve. Not to mention displaying picture on your screen is impossible without gamma-adjustment and managing brightness-contrast characteristics through display ICC profile, which are also controlled by curve. Moreover, when you shoot on film, image which you see after developing is affected by characteristic curve of particular film you have used.
Thus, despite what kind of camera you use and how much attention you pay to developing image in either dark or light room, understanding curves is rather crucial. And not only for photographers: scanning clerks, color-correctors, designers, print workers and many other specialists who work with raster graphics use curves. Hence, curves is primary (often the only one) and most effective tool to process pictures.
One can write a whole book on curves, and I will not be surprised if it already exists. This article is by no means exclusive or, moreover, comprehensive. In fact, my laziness made me write it – it’s easier for me to write one article than to explain the same thing to students every time. Articles I have read do not serve my teaching purpose, for one reason or another. Another reason why I wrote it is that none of the articles I happened to read presented an adequate guide to Curves. Most of them are too focused on Curves in Photoshop, not elaborating enough on key relationships between curves shape and its effect on picture.
So, let’s turn back to Photoshop as special case of curves usage and examine it with Curves tool. We will move from simple to complex and start with basic 8-bit black and white image (Grayscale color model).
Let’s apply very simple shaped curve with single point, which we will set in left part of curve and shift upwards. Follow “Image – Adjustments – Curves…” in Photoshop or press “CMD+M” (Mac) or “CTRL+M (Windows)” to reach the tool.
To start with, notice that the grey area in Curves represents a histogram of our black and white picture. Histogram shows brightness distribution in image. Since we used 8-bit picture, brightness of each pixel is represented with maximum 256 values (also called levels). In this system 0 levels correspond to black point and 256 levels to white point. Leftmost point of histogram (and Curves tool, as it is shown on screenshot) corresponds to the darkest pixels (with 0 levels), and rightmost to the brightest (with 255 levels). Number of points with particular level is shown vertically.
Any kind of curve redistributes brightness data of image. On the picture above we selected point with input level of 57 (depicted horizontally) and set it to 101 levels (depicted vertically). This means that all pixels with input level 57 (out of 255), afterwards will become pixels with 101 levels (out of 255).
The rest of pixels will change its levels according to curve shape. In particular, after applying presented curve, brightness of all pixels, except black and white, will change. The picture will become brighter, as all pixels will increase their value.
Curve, which does not affect image and pixel levels, is actually straight line linking leftmost and rightmost points at 45 degrees angle. This is default shape of curve in Photoshop tool. Usually it is mentioned before explaining how Curves work, but in my opinion it is easier to understand line as a special case of curve.
Now, when we know how curves work, let’s turn to something more specific.
In order to brighten image, you need to shift curve above default line. In this case pixel levels will increase.
In order to darken image, you need to shift curve below default line. In this case pixel levels will decrease.
The above curve shapes correspond to Brightness changes in much software, particularly Adobe Lightroom (Adobe Camera Raw). When Brightness set to positive value it is almost equal to moving upward middle point of curve. Negative Brightness value, in fact, moves middle point down.
Contrast is determined by difference between brightest and darkest points, in our case – pixels of 8-bit image. The greater the difference, the higher the contrast, and vice versa.
If we change all black pixels value of 0 levels to, say, 30 levels (the rest of levels calculated accordingly), we will reduce image contrast. This is because black point will become “greyer”, i.e. lighter. In fact, we have changed initial range of 0-255 levels to new one – 30-255 levels, reducing difference between brightest and darkest points.
Opposite can be done, as well, by setting all pixels with value of 30 levels to 0 levels (and ones with value below 30).
Rest of values will be calculated accordingly. By using curve we have changed initial range of 30-255 levels (ignoring ones below 30) to new range of 0-255 levels. I.e. we increased difference between brightest and darkest points, thus adding contrast.
Important observation: Increasing contrast is related to increasing curve slope relative to default 45 degrees, and decreasing contrast – to decreasing slope. In other words, the steeper the slope – the higher the contrast.
Same adjustments may be done to white point, essence stays the same.
Now let’s turn to more common case, when curve is not a straight line. In this case angle of the curve is determined by tangent in this point. And contrast changes are determined by tangent angle adjustments.
Contrast decreases when tangent angle is below 45 degrees and increases when tangent angle is above 45 degrees.
In order to understand how contrast changes in given example let’s take a look at histogram.
The grey histogram is original; the black one is after applying above curve to the picture. Notice so-called “stockade” (left part of histogram) and “comb” (right part), which showed up after applying curve.
“Stockade” is caused by “collapsing” nearby levels after contrast reduction. Since some range of levels (e.g. 0-100 levels) is recalculated to new range (e.g. 30-100 levels) some amount of “excessive” data appears (30 levels, in given example). Software needs to keep this data somewhere and it leads to doubling number of some levels, which are displayed as peaks on histogram.
And, alternatively, “comb” is caused by “thinning” levels after contrast increase. Indeed, some range (e.g. 100-200 levels) is recalculated to new range (e.g. 50-250 levels). This process causes lack of data, which results in some number of 0 levels, shown on histogram.
Truly, when both histogram and curve visualized one against another, one may notice that: contrast reduced in shadows (tangent angle is below 45 degrees), slightly changed in midtones (tangent angle is close to 45 degrees) and contrast was increased in highlights (tangent angle is above 45 degrees).
One of most popular ways to increase contrast in most software (and some analogue processes, such as film emulsion) is S-shaped curve.
Human eye is most sensitive to midtones, and less sensitive to shadows and highlights. So if you want to increase contrast it is better to start with midtones. At the same time we may sacrifice shadows and highlights or compress them (decrease contrast in these areas). And this is what S-curve does.
Mentally trace how tangent angle changes in different points of the curve. It increases in midtones, and decreases in shadows and highlights. This way whole pictures contrast increases, and decreases in areas less important to human perception.
This curve is equal to positive values of Contrast parameter in most software, particularly in Adobe Lightroom (Adobe Camera Raw). Setting positive value to Contrast is almost the same as fixing middle point of curve and shifting points at ¼ and ¾ of curve downwards and upwards for equal value.
Negative Contrast values have same effect, but shift ¼ and ¾ points in opposite directions.
As you see Brightness and Contrast tools in any software have very limited capacity. If Curves used for same adjustments, depending on particular picture it is possible to:
a) set points in different parts of the curve;
b) shift points for different values;
c) use more than 1-3 points.
For the same reason there is no use in Levels tool, which is, in fact, special case of Curves.
Levels midtone slider is almost equal to central point in Curves (not exactly, but very close to it), and in Levels it is only adjusted in two directions. Left and right sliders in Levels correspond to left and right points in Curves. We cannot set any additional points in Levels.
Now let’s move to color.
Color images curves
Up to now we considered curves according to black and white image in Grayscale color model. So what about color? Within the scope of this article I will intentionally confine myself to basic usage of curves in RGB color model. CMYK and Lab color models worth separate research, which is out of this article scope.
So, let’s take color picture in RGB model. I guess it will not surprise you that such picture is actually consist of three black and white images, each containing relevant color channel.
Now let’s apply some kind of curve to this picture. Let it be S-curve to increase contrast.
By this we have applied curve to so-called composite RGB image, i.e. same shaped curve to all three channels (Red, Green, Blue) at the same time.
You can see input picture’s histogram to the left, and output – to the right. True, in whole picture’s contrast increased, while shadows and highlights lost some contrast.
Notice that we applied same curve to all three channels, but initial brightness distribution across channels is different. Problems which arise after using composite curve are out of this article’s scope. However, these problems are very typical, especially in software which does not make use of separate channels curve or Lab color space. I will only mention that applying composite curve to RGB picture may cause unwanted color shifts.
In general, it is better to use different curves for separate channels (which does not exclude composite curve usage). Brightness redistribution in each channel will be the same as in case of black and white image. But in case of color image, color resulting from channels mixing should be noticed.
It is important to understand that by increasing brightness in one channel (or some area in this channel) this channel become “stronger”. In other words we increase input of this channel to final RGB image.
For example, let’s take some area with pixel values of (128, 128, 128) in RGB color space. As all values are equal in three channels the color of this area is neutral. Assume R value becomes 200 instead of 128, after applying brightness increasing curve in red channel. The total value becomes (200, 128, 128). As you see, color of this area shifts to red. This demonstrates how red channel R became “stronger” (increased brightness).
And weakening red channel R (reducing its brightness) causes reduction of red color in final image. In other words color, opposite to red will appear – mix of green and cyan.
Same will happen after changing brightness in other channels. Green channel G strengthening/weakening will cause green and magenta color casts, accordingly.
Blue channel B strengthening/weakening will cause blue and yellow color casts, accordingly.
Note: In printing industry, which uses CMYK color model, it is common to use terms “strong”/”weak” in opposite meanings. “Weak” color is the lightest channel (since it has smallest influence on final image, which is printed on paper), and “strong” color is the darkest.
Here are some examples.
Those curves are only for illustrative purposes. By understanding how curves work it is possible to use more sophisticated shapes with more points, and combine it together with composite curve. Below is an example of what can be done to the bikes picture by single use of Curves tool only.
This is exaggerated example for illustrative purposes only, so there is no use in evaluating it. This article is aimed to give understanding of how Curves work and does not involve artistic aspect of such corrections. Artistic value is standalone and huge topic.
I hope this article will be helpful for you. I will gratefully accept any kind of corrections.