Showing posts with label photoshop. Show all posts
Showing posts with label photoshop. Show all posts

Friday, December 26, 2008

Look Sharp!

Every once in awhile I come across images on the Web that look unusually crisp and sharp. But not in a bad way with obvious halos and other over-sharpening artifacts in images almost as common as those that look too soft. After tinkering with a few approaches, I've settled on a method that works well for me.

For a long time, I've been a big fan of PixelGenius's PhotoKit Sharpener, a suite of Photoshop tools for image sharpening based on the seminal work of Bruce Fraser and other authorities. Although I still use it exclusively for all sharpening aspects in my printing workflow, I've sometimes been less enamored of the results for Web sharpening.

Until recently, I used PhotoKit Sharpener to do capture sharpening and then used Photoshop's bicubic sharper algorithm for resizing down to Web territory. I've been relatively pleased with the results but looked around for a little extra boost.

After reading up on clinical comparisons of resampling algorithms (of which there are many more than offered in Photoshop), it seemed like there was a relative consensus that Lanczos, Sinc, and Catrom algorithms tended to do a better job than some of the others, including Photoshop's bicubic family.

I decided to try using the ImageMagick convert command to resize using the Lanczos filter. It's a command-line tool (which automatically turns many people off) with a huge and daunting set of often sparsely-documented options. But, after some Web research, here's what I ended up coming up with as my own starting point for down-sizing images for Web use:


convert -filter Lanczos -resize "500x500>" -density 96x96 \
-quality 80 -sampling-factor 1x1 -unsharp 0.6x0.6+1+.05 \
input_file_name output_file_name


This combination of command line options does the following:

-filter Lanczos
obviously selects the Lanczos resampling method from the many that ImageMagick supports.

-resize "500x500>"
indicates we want the down-sized image to be 500 pixels on the longest dimension. The ">" character indicates that we don't want to create a new image if the existing one is already that size or smaller.

-density 96x96
is just bookkeeping to indicate the image has a resolution of 96 ppi. It's not really necessary.

-quality 80
indicates the JPEG compression quality I want.

-sampling-factor 1x1
indicates the sampling factor for the JPEG compression. I don't know for sure, but this may be the default.

-unsharp 0.6x0.6+1+0.5
applies a little unsharp filter after the down-sizing. This is one of the most difficult areas to find useful information and guidelines on but this is what I came up with for 96 ppi display and it works well in most cases for me.

When I prep an image for Web use, I do the bulk of the work in Photoshop, convert to the sRGB color space (boo! hiss!) and save it as a TIFF file. Then I apply the convert command just described to create my Web-sized image. I actually have this command, and a couple others to handle IPTC copyrighting, etc., in a batch file that I just pass the TIFF file name to for processing.

Not every image will work optimally with this particular process but it's looking like a great starting point for my taste. Give it a try if you have ImageMagick installed. (It's available on all major platforms.)

Saturday, March 1, 2008

Shadow Noise Elimination Technique

Here's a tip for dealing with noise in shadow areas of images. This technique assumes you're satisfied with midtone and highlight quality but have unacceptable noise levels (luminance, chrominance, or both) in shadows. This description presumes raw shooting and the use of Adobe Camera Raw (ACR) for image development, but can be adapted for other environments.

In a nutshell, you layer two versions of the image. The bottom layer is the normal exposure with noisy shadows. The layer above it is an overexposed version, which is tonally adjusted. Blending is used to selectively allow only the adjusted noise-free shadow tones of the top layer to be visible while the midtones and highlights of the bottom correctly-exposed layer are used.

The example images shown are crops at 2X scaling and have levels cranked up so you can clearly see what's going on. (Click to view full size.) First, the noisy normally exposed image:



You will shoot two exposures of your scene, one correctly exposed, the other 2 stops overexposed. (We'll look at a variation of this technique using only one image later.)

The overexposed image has what were the shadow tones of the correctly-exposed image placed in your camera's midtone sweet spot where it should be relatively noise-free. In ACR, develop your correctly-exposed image normally and then apply the same ACR settings to the overexposed version with one exception: move the Exposure slider to -2.0 to move the overexposed midtones down to the shadow region.

The shadow tones will now look flat because they don't have that nice S-curve adjustment at the toe that's applied in the raw processing. Apply a contrast adjustment yourself, either in ACR or later with a Curves adjustment. Your highlights will be blown out but you don't care because you won't be using the highlight parts of this image.

Bring the adjusted exposure image version into a separate layer above the correctly-exposed image layer. They need to register precisely—jigger them if needed. (Pardon the sophisticated technical terminology.) Now you'll do some magic to only keep the shadow regions of the upper layer.

Leave the blending mode at "Normal". Go to "Blending Options" for this layer and adjust the "Blend If" setting at the bottom as follows. Leave the drop-down setting at "Gray"; drag the right slider on "This Layer" toward the left to around 128; alt-click the slider to split it and drag farther left to about 64. What you've done is made the brighter regions of the layer transparent and the shadows opaque, with a nice gradual transition between the two to make it look natural. Poof!, instantly-improved shadow tones less the noise. Tweak the "Blend If" sliders to optimize for the particular image you are working on. There's quite a remarkable improvement in the quality of shadow tones of the blended image.


For images that you don't have, or can't shoot, the second (overexposed) version of the image, you can try the same technique from a different angle. Duplicate the original image and apply an aggressive noise reduction on it using one of the standard noise-reduction tools. Because you'll only be using the shadow tones, you can be quite aggressive with the noise reduction as the introduced artifacts won't be as noticeable in the shadows. Put the noise-reduced version on a layer above the original, and apply the blending technique as described above. You'll get the benefit of strong noise reduction in the shadow tones without the image degradation in the midtones and highlights that might be introduced by noise reduction.

Vignetting Revisited

After enduring a little confusion and frustration in correcting some images from my Canon G9 camera, I investigated a little more and found ...