DSPRelated.com
Forums

image out-of-focus blur identification

Started by Ling Chen November 30, 2011
On 30 Nov, 18:56, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> Rune Allnor wrote: > >>Doctor Rune = idiot. > > > Maybe. > > Indeed he is. > > >>The blurring happens in the wave domain. > > > No, it doesn't. > > OK. How about this: > Here is a sharp image A. > Here is the image A', which is the same image as A, but blurred. > Here is the other image B', blurred by the same function. > Now derive the blur function from A and A', and apply the inverse of > this function to B' to get a clean image B.
Yes? The operation on image A is system identification. The operation on image B is deconvolution. Both operations can be done in the spatial intensity domain or corresponding Fourier domain, depending on availabe tools and other details. They have nothing to do with the wave nature of light. Rune
Ling Chen <erie.stevens@gmail.com> wrote:

> Suppose an image is out-of-focus blurred. We have the original image > and its blurred version. What is the best approach to estimate the > blur function? That is, given y(m), x(m), how to we estimate the > point spread function (or impulse response function) h(m): > y(m) = h(m)*x(m) + n(m)
Read "Deconvolution of Images and Spectra" by Jansson. He goes into a good description of non-linear deconvolution. (I presume the n(m) is noise.) The problem with linear deconvolution is that it doesn't consider that the intensity can't be negative, and so doesn't treat the noise in a reasonable way. The book should be in the engineering library or physics library of many universities. -- glen

Rune Allnor wrote:

> On 30 Nov, 18:56, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > >>Rune Allnor wrote: >> >>>>Doctor Rune = idiot. >> >>>Maybe. >> >>Indeed he is. >> >> >>>>The blurring happens in the wave domain. >> >>>No, it doesn't. >> >>OK. How about this: >>Here is a sharp image A. >>Here is the image A', which is the same image as A, but blurred. >>Here is the other image B', blurred by the same function. >>Now derive the blur function from A and A', and apply the inverse of >>this function to B' to get a clean image B. > > > Yes? > > The operation on image A is system identification. > The operation on image B is deconvolution. > > Both operations can be done in the spatial intensity > domain or corresponding Fourier domain, depending > on availabe tools and other details. They have > nothing to do with the wave nature of light.
Please identify a couple of droplets of water somewhere in the optical system.
On 30 Nov, 19:36, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> Rune Allnor wrote: > > On 30 Nov, 18:56, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > > >>Rune Allnor wrote: > > >>>>Doctor Rune = idiot. > > >>>Maybe. > > >>Indeed he is. > > >>>>The blurring happens in the wave domain. > > >>>No, it doesn't. > > >>OK. How about this: > >>Here is a sharp image A. > >>Here is the image A', which is the same image as A, but blurred. > >>Here is the other image B', blurred by the same function. > >>Now derive the blur function from A and A', and apply the inverse of > >>this function to B' to get a clean image B. > > > Yes? > > > The operation on image A is system identification. > > The operation on image B is deconvolution. > > > Both operations can be done in the spatial intensity > > domain or corresponding Fourier domain, depending > > on availabe tools and other details. They have > > nothing to do with the wave nature of light. > > Please identify a couple of droplets of water somewhere in the optical > system.
As I said earlier, you need to keep the optical system and the image as such, apart. Yes, you can study the optical system in terms of Fourier transforms of the optical components, and in that sense you can predict the blurring effects on the resulting image. But you can achieve the same description without using the wave description at all; it can be done with raytracers. Either way, you can't do things the other way around: You can't deduce the configuration of the optical system from studying the blurring of the image. Starting with only the image, you can only - at best - describe the PSF. Rune
On 11/30/11 12:56 PM, Vladimir Vassilevsky wrote:
> > > Rune Allnor wrote: > > >>> Doctor Rune = idiot. >> >> Maybe. > > Indeed he is. >
oh c'mon Vlad, this is bullshit. i'm usually tolerant of your intolerance (sometimes i'm mildly entertained), but this is different. can you consider being a little bit nicer? about the content, i think of it alot like YPbPr video. i don't think the Y signal is bipolar, while i imagine that Pb and Pr are bipolar. but if it's RGB, none of the three are bipolar. and, if only Y is considered, if you have a representation of the signal going into and outa an LTI system, you can decidedly determine the transfer function of the LTI system. and i think what the LTI does to Y is the same as what it does to RGB or to Pb/Pr. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Nov 30, 12:29&#4294967295;pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 30 Nov, 18:01, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > > > > > > > Rune Allnor wrote: > > > On 30 Nov, 17:31, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > > > >>Rune Allnor wrote: > > > >>>On 30 Nov, 16:13, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > > > >>>>Rune Allnor wrote: > > > >>>>>On 30 Nov, 14:35, Ling Chen <erie.stev...@gmail.com> wrote: > > > >>>>>>Hi there, > > > >>>>>>Suppose an image is out-of-focus blurred. We have the original image > > >>>>>>and its blurred version. What is the best approach to estimate the > > >>>>>>blur function? > > > >>>>>This could also be viewed as 'deconvolution'. > > > >>>>>Given the two images x and y, the blurring operation is expressed > > >>>>>as y = h (*) x where h is the system response to be found, and (*) > > >>>>>denotes convolution. > > > >>>>>Extracting this system function h is 'system identification' > > >>>>>while extracting an unknown x from is 'deconvolution'. > > > >>>>No. > > > >>>>An image is an intensity picture. That is, abs(x) not x. > > > >>>Wrong. abs(x) would indicate that there is a -x. > > > >>???? > > > >>Let the input be X and the output be F(X). How would you approach a > > >>system identification if only |X| and |F(X)| are available? > > > > You seem to be stuck in the realm of DSP, where a 'signal' > > > is isomorph to a 'wave' which has both positive and negative > > > devations from equilibrium. That's not the case in image > > > processing, where one deals with non-negative intensities. > > > Since intensity can not be negative, what is measured is > > > x, not |-x|. > > > Doctor Rune = idiot. > > Maybe. > > > The blurring happens in the wave domain. > > No, it doesn't. You need to distinguish between > the EM wave that propagates through space and the > optical system, and the properties of the image > itself. There are several FTs involved in > optics, and one needs to keep them apart: > > - The EM spectrum of the impigning light wave. > - The 2D spatical spectrum of the intensity image. > > The PSD is defined in 2D spatial domain. I know, > it takes a little bit of contemplation to see the > difference. > > > If the intensity images are all that available, then the problem is > > intractable. > > Again, you are stuck with DSP. Different data domain -> > different signal properties -> different challenges -> > different methods. > > Rune- Hide quoted text - > > - Show quoted text -
Actually we have two kinds of issues here. The recording of the image is a time averaged amplitude square of a impinging travelling wavefront. Thus the blurring may consist of both coherent and incoherent convolutions. In astronomy we deal with both of these issues. Speckle imaging deals with the coherent blurring resulting from the atmosphere during a very short time exposure (hence the atmosphere seems stationary during this exposure). Worse is dealing with time averaged blurring from a long exposure. This is corrected by adaptive optics during the exposure - i,e, flex the mirror while using a lodestar (artificial or real) as a reference We don't know why the OP's image is blurred. Did the subject move during the exposure? Did the camera's auto focus hunt during the exposure? Was there camera shake during the exposure? Are there bad optics where the blurring is coherent? Each of these problems need different treatments. Some cameras now take mulitple pics and discard the "blurry" ones. A crude way to measure blurriness is to compress the image via jpeg and the blurry images tend to compress more that a sharp image of the same scene. "Lucking imaging" involves shooting a video and sorting the images by the degree of high frequency content in their fourier transforms. Again a lack of high frequency content is assumed to be a blurry image. But going back to the OP's subject line, a blurry image is relativly easy to detect if you have a comparison image of the same scene. Thus take multiple pics and pick out the best. An image in isolation will be harder to tell if it is sharp or not. If your image taken at a low F ratio thereby resulting in a narrow depth of field so most of the picture will be blurry on purpose, then how will your machine know this a priori? We need to know more from the OP. Clay
Rune Allnor <allnor@tele.ntnu.no> wrote:

(snip)
> As I said earlier, you need to keep the optical system > and the image as such, apart. Yes, you can study the > optical system in terms of Fourier transforms of the > optical components, and in that sense you can predict > the blurring effects on the resulting image.
> But you can achieve the same description without using > the wave description at all; it can be done with > raytracers.
> Either way, you can't do things the other way around: > You can't deduce the configuration of the optical system > from studying the blurring of the image. Starting with only > the image, you can only - at best - describe the PSF.
You might be able to. If, for example, that you knew that the problem was spherical aberation of a one-element lens, you might be able to back-compute some lens properties. It gets harder with more lens surfaces, and with noisier data. -- glen
On 30 Nov, 21:55, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Rune Allnor <all...@tele.ntnu.no> wrote: > > (snip) > > > As I said earlier, you need to keep the optical system > > and the image as such, apart. Yes, you can study the > > optical system in terms of Fourier transforms of the > > optical components, and in that sense you can predict > > the blurring effects on the resulting image. > > But you can achieve the same description without using > > the wave description at all; it can be done with > > raytracers. > > Either way, you can't do things the other way around: > > You can't deduce the configuration of the optical system > > from studying the blurring of the image. Starting with only > > the image, you can only - at best - describe the PSF. > > You might be able to. &#4294967295;If, for example, that you knew that > the problem was spherical aberation of a one-element lens, > you might be able to back-compute some lens properties.
In my book, that's not system estimation but parameter estimation. Two different problems. Rune
On 11/30/2011 10:22 AM, Rune Allnor wrote:
> On 30 Nov, 16:13, Vladimir Vassilevsky<nos...@nowhere.com> wrote: >> Rune Allnor wrote: >>> On 30 Nov, 14:35, Ling Chen<erie.stev...@gmail.com> wrote: >> >>>> Hi there, >> >>>> Suppose an image is out-of-focus blurred. We have the original image >>>> and its blurred version. What is the best approach to estimate the >>>> blur function? >>> This could also be viewed as 'deconvolution'. >> >>> Given the two images x and y, the blurring operation is expressed >>> as y = h (*) x where h is the system response to be found, and (*) >>> denotes convolution. >> >>> Extracting this system function h is 'system identification' >>> while extracting an unknown x from is 'deconvolution'. >> >> No. >> >> An image is an intensity picture. That is, abs(x) not x. > > Wrong. abs(x) would indicate that there is a -x. > How do you define negative intensity?
Consider the shadow of a straight edge in the light of a point source. If negative intensities existed, its intensity would be as sin(x)/x. Since there is no negative intensity, we actually get |sin(x)/x|. That makes the problem harder.
>> It makes for a >> nasty problem.
OK. You said it first.
> Deconvolution is nasty no matter the properties > of the data themselves.
We agree. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On 11/30/2011 12:01 PM, Vladimir Vassilevsky wrote:

   ...

> Doctor Rune = idiot.
Bah!
> The blurring happens in the wave domain. > If the intensity images are all that available, then the problem is > intractable.
Not intractible. Point-spread functions are computes routinely. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;