| |
Better Than USM
| |
This tech page is Photoshop
specific, in search of better sharpening than the standard UnSharpMask
filter.
The test image is shown
on the right (Jpeg compressed of course) please download
the original PSD image for accurate evaluation.
So, how to sharpen without
using the USM?
The Filter/Other/Custom
is a rarely used filter, it surely does not look very attractive.
However it is a very basic image enhancement operator, the convolution
kernel. Most of the image enhancement filters do it by convolution
but they usually have somewhat more friendly interface.
The Custom filters can be
saved to a file and the dialog allows both image preview and provides
the small zoom box. When the filters are named meaningfully and
saved to a directory of their own the Custom filter becomes
rather useful, and one can always record the Custom Filter operation
as Actions, this makes them even more easy to use.
|
Jpeg copy of the Original
(do not download this)
|
For sharpening both Blur
and Sharpen kernels are needed, please
download them here. Unzip them into a directory of their own
and they can be easily loaded directly from the Filter/Other/Custom filter.
The Blur convolution filters
are based on the first order Gaussian low pass filter and they provide
blurring at 1%, 2%, 3%, 4%, 5%, 10%, 15%, 20%, 25%, 30%, 35%, 40%, 45%,
50%, 65%, 80%, 100%. These percentages relate to the standard Gaussian
Blur function in Photoshop in such way that 100% give about the same
amount of blurring than radius 0.6 in the Photoshop Gaussian Blur filter.
The radius parameter in the Gaussian Blur filter in Photoshop works
rather oddly, radius 0.1 does not affect at all, radius 0.2 has only
a small effect and then there is a large perceptual change from 0.2
to 0.3 and so on. Also the Photoshop Gaussian Blur is not actually Gaussian.
So the convolution filters gives much finer control over the blurring.
The Sharpen convolution filters
are based on the Laplacian at various gain and they provide sharpening
from 50% to 750%. These percentages are approximately the same as the
amount percentage value in Photoshop USM when radius is set to 0.5 and
threshold to 0. These sharpening convolution filters do not give
as fine control as the Photoshop USM that (seemingly) allows 1% stepping.
However the 50% steps are rather adequate. Most importantly the Photoshop
USM has features that makes it somewhat inefficient when compared to
by-the-book sharpening.
Evaluation
At this time I provide
only one example. I strongly recommend the reader to evaluate themselves,
it is truly beneficial.
What is considered to be good,
better or best image appearance is of course in the eye of the beholder,
even if there are some quality factors that can also be measured.
In the below example, in my
opinion, the quality difference is very apparent. You may want to evaluate
at other USM settings, (since I have spent a quite a while in reverse
engineering the Photoshop USM parameters I can say that there is no
USM settings that gives anything near to the the Blur 30% + Sharpen
500% appearance).
Please evaluate under a dim
or dark ambient lighting.
| |
Convolution in Photoshop
by:
Blur 30% followed by Sharpen
500%
|
Photoshop USM at:
Amount=500, Radius=0.5, Threshold=4
|
|
Black (e.g. bottom-right)
is better.
Sharpening is better in the
shadows.
Colors are the same as in the
original.
More details are seen. |
Smudge general
appearance & colors change & high noise in the shadows &
fine detail is lost.
|
A closer look at 200%
zoom from the right eye (on the left on the monitor) is shown below:
So, there is a difference
clearly. Which one do you prefer?
Photoshop
Convolution is Buggy
During the above exercise
I noticed that Photoshop has a bug in the Filter/Other/Custom -filter
(the convolution filter), it simply calculates incorrectly. It can be
seen by setting the center box value to 9 or higher (and all other to
zero or empty) and setting the scale to the same value. Image should not
be altered at all by such a kernel but it changes. Only if the center
box and the scale are set to value 8 or below the image image does not
change. The image should not change at all since it is just the calculation
of
9 * channel_value / 9. Now
only kernels that have the divisor smaller than 9 operate properly, and
there are only very few such usable kernels.
In order to experiment how the
bug affects I made exactly the same filtration as above also in Corel
Photo-Paint v.8 that calculates the convolution correctly. The side
by side comparison is below.
You probably can easily see
that Photoshop version has higher overall noise, has much less fine
details and it is less sharp. The noise in the deep shadows is slightly
smaller in Photoshop version, this is due to the fact that the bug in
Photoshop usually makes the RGB level to be less than it should be.
Convolution using Photoshop
by:
Blur 30% followed by Sharpen
500%
|
Convolution using Photo-Paint
by:
Blur 30% followed by Sharpen
500%
|
It is possible that the
same bug is in other Photoshop filters/operations also, this would explain
the poor performance of e.g. the Gaussian Blur and USM.
I have also experimented the
convolution sharpening
using the FilterFactory, this way the Custom filter bug in Photoshop
can be by-passed.
Accurate Image Manipulation for Desktop Publishing
Copyright
Timo Autiokari, 1999-2007. Contact
info |