Wednesday, June 16, 2010

[Trick] Which Sharpening Method do I use?

I keep seeing this question from people who now have access to a digital camera and want to create the best image they can out of it. 


Regardless of what some people may claim, there is no single sharpening method/parameters that will work on all kinds of images. What method you use, and what parameters you use, will (and should) depend on the nature of features in the image, the size of the image, the amount of noise in the image, and what you want the final results to convey aesthetically. 

Example: you have a macro shot, and you want to accentuate the fine tentacles on a spider's arms. You cannot just use the Librodo sharpening method with those parameters. It may work, it may not. The reason being: most sharpening filters are a combination of one or more 'local' image operations, and one inherent part of a filter's definition is its 'scale' (meaning what is the local area of impact of the filter). So let's say you want to use a RAW image of dimensions 4000x4000 (example only), and you know that a single tentacle spawns over 3 pixels in width in the image, it won't serve you any good by specifying the filter size to 0.1 pixels. On the other hand, if you downsized the image to say 800x800, now you may be able to use a sub-pixel filter size. 

In summary, there is no such thing as a 'generalized sharpening method'. You will have to tweak and create one that suits your needs for a given image, and what you want to achieve with it. 

ETA: In general, it helps to do these steps generally in this order: 

- On a full resolution (RAW) image, de-noise it first 
-- To do this, you will need to understand the type of noise. Generally its randomly distributed, but may not be equally distributed across all three channels, and may be more prevalent in dark areas. Either you trust the NeatImage sorta filters, OR you zoom in the image, and understand the nature of the noise, and play around with parameters for the method to reduce it. The most basic method would be to apply a gaussian smoothing, with filter size of the order of a single noise element 

- Do any other post processing here (layers etc) (optional) 
-- If you sharpen (unsharpen) here, make sure to pay attention to the 'scale' of the feature that you want to preserve/accentuate. 

- Down size the image, with the 'best interpolation' method available to you 
-- Use the option to keep the sharpness upon down sampling if you already did all the pre processing before and just want to create the final image now 
-- Use the option to keep smooth gradients in the image if you intend to do the post processing on the reduced size image 

- Do any remaining post processing here 
-- If you sharpen (unsharpen) here, make sure to pay attention to the 'scale' of the feature that you want to preserve/accentuate. 


Here is a good article on sharpening.

Hope that helps...