Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Digital Photography > Fixing an unfocused image theoretically straightforward?!

Reply
Thread Tools

Fixing an unfocused image theoretically straightforward?!

 
 
223rem
Guest
Posts: n/a
 
      04-20-2007
If an unfocused image = convolution of the focused image with a Gaussian
kernel, then this is a linear thus invertible transform, and therefore
the focused image could in principle be recovered by guessing the sigma
of the blurring Gaussian!

Right? Most likely not, but why?
 
Reply With Quote
 
 
 
 
MarkČ
Guest
Posts: n/a
 
      04-20-2007
223rem wrote:
> If an unfocused image = convolution of the focused image with a
> Gaussian kernel, then this is a linear thus invertible transform, and
> therefore the focused image could in principle be recovered by
> guessing the sigma of the blurring Gaussian!
>
> Right? Most likely not, but why?


But how would it detect which portions of the image are blurred simply due
to desired, normal DOF limitations vs. the focussing mistake within the
frame? A perfectly focussed subject/portion is rarely surrounded by
perfectly-focussed elements unless you're shooting a wholly distant
landscape, a flat-to-sensor subject, or at such huge DOF settings as to be
nearly identically sharp, near to far. I frankly wouldn't even attempt to
answer your question with math, proof, etc. I'm just thinking the above is
one reason why there would be problems. Maybe Roger Clark, or perhaps David
Littlewoodcan help you with this one...

--
Images (Plus Snaps & Grabs) by MarkČ at:
www.pbase.com/markuson


 
Reply With Quote
 
 
 
 
Kevin McMurtrie
Guest
Posts: n/a
 
      04-20-2007
In article <(E-Mail Removed)> ,
223rem <(E-Mail Removed)> wrote:

> If an unfocused image = convolution of the focused image with a Gaussian
> kernel, then this is a linear thus invertible transform, and therefore
> the focused image could in principle be recovered by guessing the sigma
> of the blurring Gaussian!
>
> Right? Most likely not, but why?


Not true.

First, the signal to noise ratio quickly heads towards zero when you
undo a blur. The worse the blur, the less unique signal is left in each
pixel to extract.

Second, focus blur is not uniform for objects with different distances.
The amount of blur correction can only be guessed.


Mild haze from a cheap lens can often be completely corrected but lack
of focus can only be slightly corrected. Some enhancement applications
will use pattern matching to guess what the picture used to look like
and redraw it as a sharp image. It can produce a pleasing image if
enough of its guessing is right. Sometimes is goes horribly wrong, too.
 
Reply With Quote
 
HvdV
Guest
Posts: n/a
 
      04-20-2007
Hi 223rem,
>
>
>>If an unfocused image = convolution of the focused image with a Gaussian
>>kernel, then this is a linear thus invertible transform, and therefore
>>the focused image could in principle be recovered by guessing the sigma
>>of the blurring Gaussian!
>>
>>Right? Most likely not, but why?

If it were indeed Gaussian, and the image noise-free, then indeed you could
do an inversion resulting in unlimited resolution. However, the blur function
is band limited, varies from point to point in your image AND there is noise,
always.

But that doesn't mean there is nothing you can do...

-- Hans

> Mild haze from a cheap lens can often be completely corrected but lack
> of focus can only be slightly corrected. Some enhancement applications
> will use pattern matching to guess what the picture used to look like
> and redraw it as a sharp image. It can produce a pleasing image if
> enough of its guessing is right. Sometimes is goes horribly wrong, too.

Yes!
 
Reply With Quote
 
Mike Russell
Guest
Posts: n/a
 
      04-20-2007
"223rem" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> If an unfocused image = convolution of the focused image with a Gaussian
> kernel, then this is a linear thus invertible transform, and therefore the
> focused image could in principle be recovered by guessing the sigma of the
> blurring Gaussian!
>
> Right? Most likely not, but why?


Probably not, or it would have been done already, at least for a flat
subject with low noise.

Here's a similar problem I've always thought might be interesting, that may
be easier to solve: inverting a bevel. Since a bevel is computed by
subtracting pixels offset by a constant distance along a line, integrating
along the same line should restore the original image, plus or minus a
constant.
--
Mike Russell
www.curvemeister.com/forum/


 
Reply With Quote
 
Ron Hunter
Guest
Posts: n/a
 
      04-20-2007
223rem wrote:
> If an unfocused image = convolution of the focused image with a Gaussian
> kernel, then this is a linear thus invertible transform, and therefore
> the focused image could in principle be recovered by guessing the sigma
> of the blurring Gaussian!
>
> Right? Most likely not, but why?


One needs to know the parameters of the lack of focus, and much
processing is required for mediocre results, at least in my experience.
 
Reply With Quote
 
Ilya Zakharevich
Guest
Posts: n/a
 
      04-20-2007
[A complimentary Cc of this posting was sent to
HvdV
<(E-Mail Removed)>], who wrote in article <46287046$0$2026$(E-Mail Removed)>:

> If it were indeed Gaussian, and the image noise-free, then indeed
> you could do an inversion resulting in unlimited
> resolution. However, the blur function is band limited, varies from
> point to point in your image AND there is noise, always.


Another point is quantization (which could be considered as noise too,
of course). E.g., at 5sigma, one loses 18 bits of S/N; even if there
is no noise, one needs to quantize the result at about 28bits to get
decent results. [Here "at 5sigma" means the spacial frequency;
e.g., for a Gauss blur with radius r, this corresponds to wavenumber
5/r, or half-wavelength of r*pi/5. E.g., this is applicable to
maximal resolution details blurred with a gaussian of radius 1.6 pixels.]

But indeed, the main "theoretical" reason is that diffraction is not
Gaussian; it COMPLETELY cuts off the high frequencies (see keywords
"Fourier optic" for math behind this; this is what is called "band
limited" above, but I wanted to emphasize it more).

And adding lens aberrations on top of diffraction can only worsen
things by adding some additional zeros in the MTF...

Hope this helps,
Ilya
 
Reply With Quote
 
bugbear
Guest
Posts: n/a
 
      04-20-2007
223rem wrote:
> If an unfocused image = convolution of the focused image with a Gaussian
> kernel, then this is a linear thus invertible transform, and therefore
> the focused image could in principle be recovered by guessing the sigma
> of the blurring Gaussian!
>
> Right? Most likely not, but why?


Only if there are no depth of field issues.

BugBear
 
Reply With Quote
 
HvdV
Guest
Posts: n/a
 
      04-20-2007
Hi Ilya,
>
>
> Another point is quantization (which could be considered as noise too,
> of course). E.g., at 5sigma, one loses 18 bits of S/N; even if there
> is no noise, one needs to quantize the result at about 28bits to get
> decent results. [Here "at 5sigma" means the spacial frequency;
> e.g., for a Gauss blur with radius r, this corresponds to wavenumber
> 5/r, or half-wavelength of r*pi/5. E.g., this is applicable to
> maximal resolution details blurred with a gaussian of radius 1.6 pixels.]

Good point! -- Hans
 
Reply With Quote
 
Robert Haar
Guest
Posts: n/a
 
      04-20-2007
On 4/20/07 12:56 AM, "223rem" <(E-Mail Removed)> wrote:

> If an unfocused image = convolution of the focused image with a Gaussian
> kernel, then this is a linear thus invertible transform, and therefore
> the focused image could in principle be recovered by guessing the sigma
> of the blurring Gaussian!
>
> Right? Most likely not, but why?


Digitization effects

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixing a network rengaw03@hotmail.com Cisco 0 01-20-2006 10:50 PM
fixing multi line text before saving to dbase Daves ASP .Net 4 03-10-2005 11:16 PM
fixing port speed at 1000 mbps Noah Davids Cisco 6 10-20-2004 06:31 AM
Sorry. html newsreader needs fixing - Microsoft??? Marko MCSE 1 01-07-2004 04:44 PM
Fixing an Id for a HTML Tag MS News ASP .Net 3 07-30-2003 08:51 AM



Advertisments