Tuesday, October 26, 2004

Editing in LAB Color Space (Part I)

On Sunday I was working with Wayne from my Photography class. We were sitting at his computer, sharing our Photoshop techniques with each other. He was going through his process, demonstrating on a sample image, and when he went to sharpen, he switched into LAB color mode, applied unsharp mask, and switched back to RGB. Seemed odd to me, so I pressed for details. He didn't seem exactly sure why to do it, but he had read it in a book and knew it had some sort of advantange.

So I went home and started digging for information on LAB mode. It seems there isn't all that much info on it, and the info available is mostly several years old (almost like it is a technique that was forgotten). However, the available information seemed to indicate that there were advantages in working in LAB mode. LAB mode consists of 3 channels. Instead of 3 color channels (Red Green Blue) like RGB mode, LAB mode consists of a Luminosity channel, which contains the intensity information (brightness/darkness), and two color channels A and B, which contain information on color tinting (Red vs. Green and Blue vs Yellow) but no color intensity information. Because the color information is distinctly separated from the intensity (or luminosity) information, that makes it ideal for making adjustments in which we only want to adjust intensity without introducing any color shifting.

The way unsharp masking works on an image is to increase the apparent contrast at edges. It does this by making the edge of the dark object even darker, and the edge of the light object even lighter. In this process, all we want to adjust is the intensity, not the color, so it made sense that unsharp masking would be an ideal adjustment to be applied to the L channel of a LAB mode image.

I started doing some experiments, and the advantages of LAB sharpening quickly became obvious. In sharpening, you inevitably end up with halos (the halos are what create the appearance of extra sharpness). Unfortunately, in places where you have differing colors you often end up with color tinting in those halos, and that is often very noticable. However, performing the same level of sharpening on the L channel of a LAB mode image results in halos with no color tinting. The images below demonstrate this.

Sharpening Comparison - 1x magnification

Sharpening Comparison - 4x magnification

In the above images, you can see in frames 2 and 3, where the unsharp masking was applied in RGB mode, there is a purple tint to the halo where the white and yellow sections meet. However, in frames 4 and 5, where the same amount of unsharp masking was applied to the L channel of a LAB mode image, you can clearly see that the purple tinting is gone.

There are other advantages to working in LAB mode besides applying unsharp mask. Adjusting levels can often be done better here, its easy to remove purple fringing (chromatic abberation), sometime noise removal is easier, and you can even do some fun special effects. I'll provide some more information and samples in the next couple of days.

No comments: