Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Photo Image out of focus



Jeff Weitz asked:
> Is there an optical solution to the focus problem?

Then at 06:10 AM 6/20/01 -0400, Larry Cartwright wrote:

The short answer is: no.

I think we all start out with a not-very-well-thought-through faith in
symmetry which has us convinced that anything which can be done can
somehow be undone by reversing the process.

It doesn't take too much experimenting to shatter the focus delusion.
You quickly find that the enlarger can make the image even more *out* of
focus, but there is no purely optical way to make the image more *in*
focus than it is on the negative. Not even with all the king's horses
and all the king's men :-)

I agree that it can't be done with an enlarger lens. But let's be careful;
the king's men might have more resources than you think.

As an illustration, let's consider a 1-dimensional image. Model the
blurring as a convolution, with a simple triangle-shaped kernel, such as:
K(i,j) = 0.25 delta(i, j+1)
+ 0.50 delta(i, j)
+ 0.25 delta(i, j-1)

1) It turns out that such blurring is a nonsingular transformation. You
can verify this by writing out an NxN matrix with 0.5 everywhere on the
diagonal (N cells) and 0.25 everywhere just above the diagonal (N-1 cells)
and just below the diagonal (another N-1 cells), and zeroes
elsewhere. It's invertible. The inverse is a mess, but it exists.

1a) Under favorable conditions, it is straightforward to implement the
inverse transformation using digital filtering techniques. Such filters
are built in to standard image-manipulation programs.

1b) What is perhaps more surprising is that it is possible to do it using
all-optical techniques. We are talking about some pretty tricky Fourier
optics here. (Digital image processing would be a lot easier.)
http://www.nobel.se/physics/laureates/1971/gabor-autobio.html
http://www.sira.co.uk/courses/course2.htm (see lecture 11)

2) On the other hand, the blurring transformation is "close" to being
singular, in the sense that inverse has a lot of large coefficients. It's
also rather nonlocal (unlike the blurring transformation, which is quite
local). Therefore the de-blurring transformation is a nasty _noise
amplifier_. When we account for the graininess of the film, the
nonlinearity of the film, and other non-idealities, there will be limits on
how much de-blurring is possible.


Homework: Fire up a spreadsheet, and type in a large matrix (at least 6x6,
preferably larger) that represents blurring of a D=1 image as described
above. Calculate its inverse. Observe what a mess it is. Observe how
applying it requires lots of accuracy, because of repeated small
differences between large numbers.

Hint: In excel, remember to use control-shift-enter so that the
minverse(...) expression gets entered in all cells of the destination array.