![]() |
SharpeningWhy standardized sharpening is needed for comparing cameras | ![]() |
|
Standardized sharpening
Examples
See Also
Imatest SFR Tour
Imatest SFR Instructions
How to test lenses with Imatest
Related
Understanding image sharpness and MTF
Digital cameras vs. film
The Canon EOS-10D Digital SLR
Digital cameras
Introduction to sharpeningSharpening is an important part of digital image processing. It restores some of the sharpness lost in the lens and image sensor. Virtually every digitized image needs to be sharpened at some point in its workflow— in the camera, the RAW conversion software, and/or the image editor. Almost every digital camera sharpens images to some degree. Some models sharpen images much more than others— often more than appropriate. This makes it difficult to compare cameras and determine their intrinsic sharpness. Imatest has developed an approach to solving the problem— standardized sharpening. Before we proceed, we need to describe the elementary sharpening process.
Sharpening increases image contrast at boundaries by reducing the rise distance. It can cause an edge overshoot. (A small overshoot is illustrated in the upper red curve.) Small overshoots enhance the perception of sharpness, but large overshoots cause "halos" near boundaries that can become glaringly obvious at high magnifications, detracting from image quality. Sharpening also boosts MTF50 and MTF50P (the frequencies where MTF is 50% of its low frequency and peak values, respectively), which are indicators of perceived sharpness. But sharpening also boosts noise, which is not so good. The formula for the simple
sharpening algorithm is,
Lsharp(x) = [ L(x) - (ksharp /2) * (L(x-V) + L(x+V)) ] / (1- ksharp )L(x) is the input pixel level and Lsharp(x) is the sharpened pixel level. ksharp is the sharpening constant (related to the slider setting scanning or editing program). V is the shift used for sharpening. V = R/dscanwhere R is the sharpening radius (the number of pixels between original image and shifted replicas) in pixels. dscan is the scan rate in pixels per distance. 1/dscan is the spacing between pixels. The sharpening algorithm has its own MTF (the Fourier transform of Lsharp(x) / L(x)). MTFsharp( f ) = (1- ksharp cos(2π f V ))/(1- ksharp )This equation boosts response at high spatial frequencies with a maximum where cos(2π f V ) = cos(π) = -1, or f = 1/(2V ) = dscan/(2R). This is equal to the Nyquist frequency, fN = dscan/2, for R = 1 and lower for R > 1. Actual sharpening is a two dimensional operation. Standardized sharpeningThe degree of sharpening performed by digital cameras varies greatly. Some cameras and many RAW converters allow you to change the amount of sharpening from the default value. If an image is undersharpened, the photographer will need to apply additional sharpening during the image editing process for best results. Many compact digital cameras oversharpen images, resulting in severe peaks or "halos" near boundaries. This makes small prints (4x6 or 5x7 inches) look good straight out of the camera, but it doesn't truly enhance image quality: halos can get ugly in big enlargements and noise can become objectionable. Sharpening increases the 50% MTF frequency (MTF50). A camera with extreme oversharpening may have an impressive MTF50 but poor image quality. A camera with little sharpening will have an MTF50 that doesn't indicate its potential. For these reasons, comparisons between cameras based on simple MTF50 measurements have little meaning. Raw MTF50 is a poor measure of a camera's intrinsic sharpness, even though it correlates strongly with perceived image sharpness. MTF50P, the frequency where MTF drops to half its peak value, is equal to MTF for weak to moderate sharpening but lower for strong sharpening. Hence it is a somewhat better indicator of perceived sharpness and image quality. Imatest displays MTF50P when standardized sharpening is not displayed (is unchecked in the input dialog box). It is also available as a secondary readout. To obtain a good measure of a camera's sharpness— to compare different cameras on a fair basis, the differences in sharpening must be removed from the analysis. The best way to accomplish this is to set the sharpening of all cameras to a standard amount. This means sharpening undersharpened images and de-sharpening (blurring) oversharpened images. The algorithm for standardized sharpening takes advantage of the observation that most compact digital cameras sharpen with a radius R of about 2 pixels (though R can be as low as 1 for DSLRs). This has been the case for several cameras I've analyzed using data from dpreview.com and imaging-resource.com. The algorithm for standardized sharpening is as follows.
If the edge is seriously blurred (MTF50 <
0.2 fN ), so that there is very little
energy
at feql = 0.3 fN , the sharpening radius is increased and the equalization
frequency is decreased
to feql = 0.6 MTF50. The sharpening radius is not increased if Fixed sharpening radius in the Settings menu of the Imatest main window has been checked. The formula for standardized
sharpening with radius R is,
MTFstandard( f ) = MTF( f ) (1- ksharp cos(2πR f/dscan)) / (1- ksharp ) where sharpening constant ksharp is set so MTFstandard( feql ) = MTF(0) = 1. fN = dscan/2 is the Nyquist frequency; feql = 0.3 fN ; feql = 0.6 MTF50 for seriously blurred edges where MTF50 < 0.2 fN .The image is sharpened if ksharp > 0 and de-sharpened if ksharp < 0 (a bit different from standard blurring). For R = 2, the maximum change takes place at half the Nyquist frequency, f = fN /2 = dscan/4, where cos(2πR f /dscan) = cos(π) = -1. Sharpening with R = 2 has no effect on the response at the Nyquist frequency ( fN = dscan/2) because cos(2πR fN /dscan) = cos(2π) = 0.
Examples
Oversharpening or undersharpening is the degree to which the uncorrected pulse is over- or undersharpened, i.e., sharpened relative to the standard sharpening value. It is equal to 100% (MTF( feql )-1). It if is negative (the case for the EOS-1Ds), sharpening is applied to the original response; if it is positive, de-sharpening is applied. (I use "de-sharpening" instead of "blurring" because the inverse of sharpening is, which applied here, is slightly different from conventional blurring.) Note that it is not the actual sharpening applied by the camera and software.
The raw MTF50 of the G5 is close to the EOS-1Ds, but the corrected MTF50 (with standard sharpening) is 73% of the EOS-1Ds, very close to the ratio of vertical pixels.
Unsharp masking"Unsharp masking" (USM) and "sharpening" are often used interchangeably, even though their mathematical algorithms are different. The confusion is understandable and far from serious because the end results are visually similar. But when sharpening is analyzed in depth the differences become significant. "Unsharp masking" derives from the old days of film when a mask for a slide, i.e., positive transparency, was created by exposing the image on negative film slightly out of focus. The next generation of slide or print was made from a sandwich of the original transparency and the fuzzy mask. This mask served two purposes.
Unsharp masking was an exacting and tedious procedure which required precise processing and registration. But that has changed. USM can now be accomplished with only a few mouse clicks in an image editor. Thanks to the central limit theorem, blur can be expressed by the Gaussian function (Bell curve).
Blur = exp(-x2/2σx2 ) / sqrt(2πσx2 ) σx corresponds to the sharpening radius, R. The unsharp masked image can be expressed as the original image summed with a constant times the convolution of the original image and the blur function, where convolution is denoted by *. LUSM(x) = L(x) - kUSM * Blur = L(x) * [δ(x) - kUSM exp(-x2/2σx2 ) / sqrt(2πσx2 )] / (1- kUSM /sqrt(2π) ) L(x) is the input pixel level and LUSM(x) is the USM-sharpened pixel level. kUSM is the USM sharpening constant (related to the slider setting scanning or editing program). L(x) = L(x) * δ(x), where δ(x) is a delta function. The USM algorithm has its own MTF (the Fourier transform of the portion inside the brackets [...]). Using F(exp(-px2) ) = exp(-α2/4p)/sqrt(2p), where F is the Fourier transform, MTFUSM( f ) = [1- kUSM exp(-f 2σx2/2 ) /sqrt(2π) ] / (1- kUSM /sqrt(2π) )where fUSM = 1/σx. This equation boosts response at high spatial frequencies, but unlike sharpening, response doesn't reach a peak then drop. Actual sharpening is a two dimensional operation. Future versions of Imatest may use USM for more highly optimized Standardized Sharpening algorithms. |
|
|||