CM101 – Week 4

  • Contrast Pinning to Increase the Contrast of an Object
  • Cleaning Up Berkeley!
  • Tiger’s Don’t Like Histograms
  • Copy a Channel and Use it as a Mask
  • Smart Filters
  • Painting a Fire Truck Green
  • Painting a Car Yellow

Contrast Pinning to Increase the Contrast of an Object

Contrast Pinning is a convenient way to create two pins at the same time, as a preparation for adding more contrast or color variation to an image. With this command, you can create two pins at the same time, one at each end of the color worm. Using Curvemeister to rotate the two control points is a way to quickly increase contrast, or color variation, depending on which curve you choose to rotate..

When used on the Lightness curve of Lab, or the Brightness curve of HSB, contrast pinning lives up to its name, and adds contrast to the image with minimal or no change to the color of the image. For the other channels – for example the red channel of RGB, rotating the two pins will affect both color and contrast. Although points may be created on the a and b curves of Lab mode, contrast pinning is the a and b channels of Lab is an advanced technique that can cause problems if done improperly also the command never creates pins for the composite RGB or CMYK curves.

assignAssignment 1: Contrast Pinning

Here’s an image that will look better with more contrast in selected areas.

2007-07-29_160834

This fine animal is looking for a little more texture in his fur. ** Click on the Image to open in a new window then save as to copy to your device.**

 

MoviesClick on the play button to see a video hint for this exercise.

Let’s start with the Lightness curve of Lab mode. Find an area that you think would benefit from having its detail or texture enhanced, such as the medium gray fur, and move the cursor over the area until you get a good feeling for the location of color worm on the Lightness curve.

Then right click on the image at that point, and select the Contrast Pin command. After that, move the cursor to the margin of the Lightness curve, so that the rotate cursor appears, and make the curve a little steeper in that region. You may also move the curve up and down to change the overall brightness of the area. Don’t overdo it. Keep a soft appearance and avoid too coarse an appearance. Your curve will tend to compress the brighter and darker parts of the image, so zoom out and look at the overall effect.

The curve control points that were created on the a and b curves are not useful. Click on the a curve, and drag the highlighted points off of the curve. Do likewise for the b curve.

Try doing this also in RGB mode, being sure to rotate the red, green, and blue curves by similar amounts. Notice that you can add contrast without changing the overall color balance. This is much easier than doing a similar operation manually.


 

The Histogram: If NASA uses them, shouldn’t we?

You can skip this section if you want. It may surprise you to know that, although Curvemeister supports histograms, I do not recommend that you use them at all. With a small number of exceptions, it is always better to look at the image directly for any information that you need than it is to look at the histogram. Having said that, I would like to explain what the histogram is, exactly, and under what conditions, if any, the histogram should be used.

As you probably know already, a histogram is a bar chart or tally that shows the count of items in one direction, and a measurement criteria in the other direction. The following example shows the number of trees for a set of designated heights. For example, there were 8 trees whose height was between 70 and 75 feet. Each of the vertical bars is called a bin. Think of them as vertical stalls, and each tree in the study may be thought of as being tossed into it’s designated bin, with the height of the bin indicating how many trees are in it. Although this is a very limited example, it is easy to imagine how you might use the data in this histogram. You could use it to calculate the approximate amount of wood in the trees, compare the histogram to last year’s to see how fast the trees are growing, judge whether a particular individual tree is and any number of additional deductions. If you were presented with two groves of trees that were substantially different in height from one another, and their histograms, you could probably make an educated guess, and match each one with it’s histogram.


A histogram showing a tally of tree heights

The histogram has long been used in digital imaging, starting with NASA, which used histograms to characterize the range of data covered by a satellite images. Photoshop and Curvemeister both support histograms. They look a different from the tree histogram above, but the principle is exactly the same. The appearance is different because there are a lot more horizontal bins, 256 to be exact. The vertical height is also larger – it can easily be in the millions, which means the histogram is scaled vertically. As with the tree example, the bins are located along the horizontal direction, and the count is vertical. The end result is a very fine grained appearance, like a mountain with hundreds of tiny ridges and bumps.


Both Photoshop and Curvemeister provide histogram displays.

The histogram is a distribution plot, or tally, of the relative number of pixels that exist for each brightness or color value. It provides a convenient way of looking at the spread of the data of your image. Most histograms are shaped like a mountain: skinny at the ends, and tall in the middle, but it’s not unusual to see a great variety of shapes.

 

A B C D E F
1 2 3 4 5 6

It if difficult, if not impossible to match an image to its histogram. Can make an educated guess for image F?

Answers: A-2, B-1, C-3, D-4, E-6, and F-5

It turns out that identifying the individual peaks of a histogram is very, very difficult. I’ve been staring at histograms for years now, and the only histogram I was able to match with it’s image is the one of the newspaper – the black type and white paper create two prominent spikes, with a bit of territory in between for the printed image. This should be a clue as to one of the practical uses of a histogram: quickly setting the shadow and highlight for printed material. It should also be a clue that the histogram is a poor reference, when you have the actual image on hand.

assignAssignment 2: Cleaning Up Berkeley!

berkeley_voice

Like most scans of printed material, this needs some curving, particularly thresholding to make it shiny and clean looking. **Click on the image to open it and Save as to copy to your device.**

Your job is to clean up the newsprint in the image shown above. To do this, turn on Curvemeister’s histogram option, as shown on the right. Then switch to Lab (or RGB), and move the ends of the Lightness (or RGB) curve to exclude most of the area of the tall peaks of the histogram. This will make the print pure black, and the paper close to pure white.

Movies Click on the play button to watch a video hint.

Turn on the histogram option for this exercise

Although the histogram can be helpful, it is often misused, Be cautious about using it. Many people set their shadow and highlight by moving the edges of the RGB or Lightness curve to match the edges of the histogram. This works well most of the time, but it is not the best way to determine shadow and highlight. Always look at your image and relate what you are doing to the importance of the area that you are choosing as the shadow and/or highlight. It can be of great artistic significance to allow some areas of your image to go completely black or white, and in doing so you allocate more of the image’s contrast range to the important parts of the image. The histogram turns you into a human exposure meter, with no judgment about the content of the image.

assignAssignment 3: Tiger’s Don’t Like Histograms

2008-01-30_142354_02

This is an image where the histogram is misleading. ** Click on the image to open it and save as to copy to your device. **

For this exercise, start by satisfying yourself that setting the bright end of the curve to match the histogram does not improve the image. Then set a highlight (or use thresholding separately for RGB and Lab) to set the highlight on the brighter of the tiger’s two paws. Notice that this floods the tiger with light, and makes the image more interesting.set a black point, choosing an area that you think includes significant shadow detail. If you are correcting in Lab, add a color bump with the saturation slider. Don’t forget blue shadows! Use one of the three stones along the right edge of the image as a neutral. Do you like the effect in RGB or Lab better. Finish up with a nice S curve that adds more contrast to the tiger’s stripes.


 

Copying a Channel for use in Photoshop or Photoshop Elements.

Curvemeister provides access to a large number of channels. One common use for this feature is to return to Photoshop or Elements, and paste this information into a layer mask.

assignAssignment 4: Copy a Channel and Use it as a Mask

In this example you will modify and copy the b channel of Lab, curve it to increase the contrast, and then use it as a mask for an adjustment layer.

Movies Click the play button to watch the video before following the procedure described below.

2007-07-29_160834

You’ll be using Lab to retrieve a mask for this dog. **Click on the image to open and Save as to copy to your device. **

  1. Please view the video hint before starting this exercise.
  2. Open the original dog image by clicking on the image link, saving the image to a folder, and opening it in Photoshop or Elements.
  3. Switch to Lab mode.
  4. Click on the a button, to make only the a channel of Lab visible.
  5. Make the a curve as steep as possible, and position it for as clean a mask as possible.
  6. Click on the copy channel icon, located under the View tab.
  7. Click the Cancel button.
  8. Create a Hue/Saturation adjustment layer, change the color as desired, and click OK.
  9. Alt-click on it’s adjustment layer, and paste your new mask in place.
  10. If necessary, click on the mask layer and use the paint tool, to clean up the mask by painting the mask black where you do not want the color effect.

This mask is a high contrast version of the b channel of Lab after curving.

A hue/sat adjustment layer, using the previous image as a mask. You may pick a different type of adjustment layer for your example

 


Comparing Colors and Measuring Statistics

Let take a moment to look at some of Curvemeister’s more specialized functionality. Curvemeister provides the ability to precisely measure color differences, noise, and other features of an image. Although these features are mainly provided for people who are in technical fields that involve image analysis, these commands may be of some interest to those of you who are curious about the underlying technology of digital imagery.

To see Curvemeister’s statistics, click on the wrench icon, and set your Hue clock options as shown below. The sample size should be at least 5 x 5, so that the statistics are reasonably accurate – in this case it is set to 11 x 11 pixels.

 

 

Delta E (dE) is probably the statistic that is of the most general interest. It is shown with the unpinned skin tone sample at the bottom. It is a mathematical representation of how different two colors are. A dE of 3.0 is considered to be undetectable by the human eye – in this case the value is almost 20, which indicates a skin tone in need of help.

Standard Deviation (sd) is a mathematical representation of the amount of data variation in the sample. This can be used to gauge image quality and texture variation, and for calculations such as the Modulation Transfer Function, which characterizes the resolution of an optical system.

The signal to noise ratio (sn) tends to increase for the darker, noisier portions of the image.

If the samples are saved to a text file, these values may be imported as a tab delimited file for processing in a program such as Excel.

 


 

Smart Filters (Photoshop Only)

Photoshop provides the ability to run a filter on a layer, and then edit the effect of that filter after the fact. In essence, this turns Curvemeister into an adjustment layer. This functionality is not supported by Elements at this time.

In Photoshop, convert the layer you want to change to a smart object. Right click on the layer, and select Convert to Smart Object. If you forget this step, Curvemeister will modify the layer in the usual way.

 

Then run Curvemeister in the usual way. In this case we place one neutral on the sidewalk, in RGB mode.

After you exit Curvemeister, the layer palette will look like this, indicating that you have run Curvemeister as a smart filter on the layer. You may now double click on Curvemeister 3 in the Layers Palette to go back to the curve, and change the Curvemeister settings.

assignAssignment 5: Smart Filters

This image was provided by Tony Cooper for class use. Use your accumulated knowledge of setting neutral and shadow (there is no highlight) to correct the colors of this delightful image. If you are using Photoshop, use Curvemeister as a Smart Filter.

irishboy

Click on the image to open it then save as to copy the file to your device.


 

Painting a Fire Truck Green

This is a fun trick that I like to present to students. Can you, by swapping the ends of one curve in one channel, make this fire truck turn green? It should not take more than a minute for you to find the answer. Surprisingly, most images look more or less normal when you do this operation.

assignAssignment 6: Painting a Fire Truck Green

In solving the puzzle mentioned above, do not concern yourself about the other colors in the image that change- we’ll deal with that later when we study masks in Curvemeister. Do your best, but don’t spend more than a few minutes on what is intended as a fun puzzle.

2005-09-25-113619

Make this fire engine, and the fireman,Green! **Click on the image to open and then Save as to copy to your device. **

 

assignAssignment 7: Painting a Car Yellow

i-love-curves

Green is easy – how about yellow! ** Click on the image to open then save as to copy to your device.

To make the car turn yellow, you will need to make the car brighter as well as change the color to yellow. This requires only one pass in Lab mode, with changes to all three curves. Give this five minutes, tops, and don’t spin your wheels if it doesn’t come relatively easily. This is a fun puzzle, rather than something you will use, very often anyway, in your actual images.

That’s it for this week.

Thanks, and happy curving from Greg and Mike!

 

For best viewing, adjust your monitor until you can see all the squares.