Archived posting to the Leica Users Group, 2009/06/07

[Author Prev] [Author Next] [Thread Prev] [Thread Next] [Author Index] [Topic Index] [Home] [Search]

Subject: [Leica] Why sharpen?
From: jean.louchet at gmail.com (Jean Louchet)
Date: Mon, 8 Jun 2009 01:37:39 +0200

> Date: Tue, 2 Jun 2009 16:22:27 -0700
> From: "Frank Filippone" <red735i at earthlink.net>
> Subject: [Leica] Why sharpen?
[...]

Hi,

my (late) answer to this thread. A bit mathematically biased though.

> Why sharpen a digital shot? ?What do you gain over the basic " negative" (
> which could be RAW, Jpeg, TIFF or something else....) ?????
>
> I understand correcting some color qualities, and overall "blend" of 
> colors,
> and exposure.....
>
> But the idea of taking an image that was captured digitally and putting it
> through a sharpening filter ( all the time) , somehow escapes me.......
>
Digital does not mean perfect.

The first factor to take into account is the "impulse response" of the
lens when it is on focus. An ideal lens should project a point of the
scene into a point on the film (or electronic sensor), but real lenses
make a (small or large) spot on the sensor. If the spot has a diameter
about equal to the interpixel distance, then this will have an
antialiasing effect. If it is bigger, there will be a loss of
resolution. In some cases it is possible to make calculations in order
to compensate for this blurring effect and more or less rebuild an
image closer to what an "ideal" lens would have given. This spot is
due to geometrical aberrations _and_ to diffraction. More technical
details about this later.

The second factor is light diffusion inside the sensor itself. In
solid-state sensors, this diffusion is much lower in the absence of an
antialiasing filter on the sensor, but it still exists. On film, there
is some diffusion of light through the emulsion. Years ago, an
"anti'halo layer" was added on the back face of the emulsion in order
to reduce this diffusion (otherwise the light would get to the film
base and get a double reflexion).

The third factor is the impulse response of the lens when it is _not_
on focus. The so-called "Setala formula" gives the diameter of the
bokeh spot (i.e. the impulse response) in function of the focusing
error (formula given below). In reality, the bokeh spot has the
diameter predicted by Setala's formula but the illumination inside is
not really uniform (this is the well-know bokeh problem), depending on
lens design.

The fourth factor is all the other factors contributing to image
blurring, in particular motion blur (or camera shake, which is
equivalent).

Thus it appears a good idea, when it is possible, to try to
mathematically reverse there four factors to get as close as possible
to "ideal" images.

Geometrical aberrations give impulse responses with strange shapes,
extremely awkward to reverse mathematically. The very best lenses
reduce the size of these strange shapes to a minimal size, smaller
than interpixel distance (7 microns on the M8)  that does not require
any correction. This may be one of the best reasons to buy Leica
lenses... however some other lenses are already very fine in this
respect (among them, my own CV 12mm, 75mm and M-Rokkor 40mm look
excellent).

Diffraction is a major factor of blur in small format cameras. On the
M8, the diffraction spot is small enough to have no practical effect
as soon as the diaphragm is opened at least at f/8. Closing the
diaphragm further than f/8 (e.g. at f/11 or f/16) is a bad idea in
this respect.

In first approximation, the 2nd (diffusion) and third (focusing)
factors result in impulse responses approx. in the shape of
homogeneous circles. The math-inclined may remember the 2-D Fourier
transform of a circle is a function looking like (sin(d)/d) where d is
the distance to the origin (physicists know this as the "Airy spot").
The basis of deblurring algorithms is closely related to this - out of
the scope here to give all the math. The important thing is that,
before applying a de-blurring (or "sharpening") filter to compensate
for this, one must adjust the deblurring filter depending on the size
of this impulse response. The bad news is that usually we don't have
any clue on this!

The consequence is that using a pre-tuned deblurring/sharpening filter
without knowing how it has to be adjusted can be a real problem. In
practice, it may be good to use a "soft" sharpener in order to
compensate for diffusion; this will be obviously more necessary on
cameras using anti-aliasing filters and even more on microformat
cameras where diffraction may be terrible; on the M8 with a very good
lens it is not really necessary I think. Then, using a "medium" or
"large" sharpening filter may be useful to try to compensate for other
factors contributing to blur, but this is highly problematic unless
one knows very exactly  the lens characteristics, the diaphragm used,
and the focusing error. So this is essentially a trial and error
process which is better to apply in post-processing rather than before
saving the "master" image.

Hope this helps.

By the way, here is the Setala formula:
                 Delta = d *f *abs (1/z - 1/d)
where Delta is the diameter of the bokeh spot, d the absolute aperture
(diaphr. diameter), z focusing distance, d object distance. "abs" is
the absolute value.

Setala, a Finn (amateur?) photographer, was a Leica user who found
this formula and engraved it himself on his Elmar, thus inventing the
"depth of focus graduations"; Leitz discovered this when Setala sent
them his Leica for a repair, and copied this into production lenses.

Jean

> Frank Filippone, digital-less.
> red735i at earthlink.net
>
>
>
-- 
Jean Louchet
INRIA-APIS 4 rue Jacques Monod 91893 ORSAY Cedex France
jean.louchet at inria.fr   http://jean.louchet.free.fr/
"I will permit no man to narrow and degrade my soul by making me hate
him" (Booker T. Washington)
----------------------------------------------------------


Replies: Reply from sonc.hegr at gmail.com (Sonny Carter) ([Leica] Why sharpen?)