# The whole question of lens sharpness...

Started Jun 12, 2013 | Discussions thread
Shop cameras & lenses ▾
Re: The whole question of lens sharpness...

Alphoid wrote:

olliess wrote:

Look at how a 2-d heat kernel describes the spreading (by heat- or Fickian diffusion) of a point source. Now compare this to the blur kernel (PSF) of a lens.

It's obvious how they're related. They're also not identical. It's a poor way to model the system, and would give bad intuition, and in many cases give incorrect results. There's a difference between math looking kind-of-similar and being identical.

Maybe it will clear up some of the confusion here if I go back to the source. My comments were in response to what you said originally, which was:

In theory, given a perfect model of the lens, I can completely undo any blur caused by the lens.

I took this statement to mean just what it said, namely that you could undo any blur given a perfect knowledge about the blur function of the lens. To me, that means lens defects, diffraction, defocus, and anything else that modifies a point in the image.

If you begin by assuming the PSF is linear and translation invariant, call it P, then the observed version of the original image, O(x,y), is the modified image, I(x,y), where

I(x,y) = (P(s) * O)(x,y) + N(x,y),

which includes a functional dependence of P on s, the distance to subject. There is also additive noise, N(x,y), which means you are not going to be able to invert perfectly by just applying the inverse of P(s) to I(x,y) - N(x,y).

Even you take away the noise, then you're still left with something that looks just like the 2-d heat equation. Thus if you are guaranteed an unique inverse for the blur problem, then it seems to imply that you are also guaranteed solutions to the backward heat equation. Hence my comment about entropy.

If you don't agree with what I've just said up to this point in my post, then I'd be happy to hear what you think are the underlying misconceptions.

Now moving on to your modified claim:

Your goal is to have an image as would come back from an ideal lens. An ideal lens would have a perfectly sharp focal plane, but would still have limited DOF.

This is a quite different assertion than the one I was responding to above. So if all you want to do is an inversion with a perfectly known kernel that is only determined for a fixed focus distance s_0, in the absence of noise, then yes I agree it can be done. You can write the solution in Fourier space:

O^(x,y) = I^(x,y)/P(s_0)

There are still some minor details, at least in theory:

Convolving an image with a PSF means, at least in theory:

1) in the frequency domain, some of the spectrum gets spread beyond the Nyquist limit

This is incorrect.

I see I was completely unclear, so let me try again:

1) The operation of masking the image with a fixed frame (e.g., a rectangular windowing) is equivalent to convolution in the frequency domain. Since the Fourier transform of a rectangle has infinite support, some of the variance below the Nyquist limit must be spread beyond the Nyquist limit. Do you agree?

2) in the spatial domain, some of the image gets spread beyond the edge of the frame

This is correct, but not significant. The PSF is small. This would only matter if the PSF was a substantial portion of the image.

The PSF may or may not be small in extent. In theory, even the PSF due only to diffraction has infinite support, although the magnitude is small outside of a small extent.

And at the end of it all, you're still left with the problem of noise.

Once you have noise in the problem then it is no longer a linear problem, right?

Incorrect. H(S) is the PSF of the lens. G(S) is the inverse of the PSF. Both are linear. Your input is:

H(image)+noise