POV-Ray : Newsgroups : povray.off-topic : Deconvolution Server Time
4 Sep 2024 11:15:13 EDT (-0400)
  Deconvolution (Message 3 to 12 of 22)  
<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Phil Cook v2
Subject: Re: Deconvolution
Date: 6 May 2010 11:18:11
Message: <op.vcah4okomn4jds@phils>
And lo On Thu, 06 May 2010 15:19:15 +0100, Invisible <voi### [at] devnull> did  
spake thusly:

> Echo, focal blur and motion blur are all instances of convolution. That  
> means, hypothetically, that by applying a suitable *deconvolution*, you  
> should be able to get back the original signal.
>
> Question: Is it actually feasible to do this in the real world?
>
> If I have an image with camera shake, can you really apply some math to  
> it and get back the unblurred image? Or is that still the domain of  
> science fiction?

You mean something like Unshake?

http://www.zen147963.zen.co.uk/

-- 
Phil Cook

--
I once tried to be apathetic, but I just couldn't be bothered
http://flipc.blogspot.com


Post a reply to this message

From: Invisible
Subject: Re: Deconvolution
Date: 6 May 2010 11:23:42
Message: <4be2defe$1@news.povray.org>
scott wrote:
>> Echo, focal blur and motion blur are all instances of convolution.
> 
> Are you sure that focal blur is a pure 2D convolution?

No. Only if everything in the frame is at approximately the same focal 
distance does it approximate a 2D convolution.

> Ditto for motion blur - it's impossible to add motion blur by simply 
> using a convolution.

If the motion is "small" relative to the distance of the objects from 
the camera, then the blur should be approximately a 2D convolution.

>> That means, hypothetically, that by applying a suitable 
>> *deconvolution*, you should be able to get back the original signal.
>>
>> Question: Is it actually feasible to do this in the real world?
> 
> The problem is when you apply a convolution to an image, you get a 
> bigger image (the size of the original image + the size of the 
> convolution window). The extra data around the edges is needed in order 
> to do the deconvolution. Obviously in a photo you don't get this 
> information.

This merely means that you can't deconvolve the edges properly.

A much bigger problem is figuring out what the hell the convolution 
kernel might have been, given only the blurred image...


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: Deconvolution
Date: 6 May 2010 12:13:09
Message: <op.vcakn5fc7bxctx@toad.bredbandsbolaget.se>
On Thu, 06 May 2010 16:19:15 +0200, Invisible <voi### [at] devnull> wrote:
> Echo, focal blur and motion blur are all instances of convolution. That  
> means, hypothetically, that by applying a suitable *deconvolution*, you  
> should be able to get back the original signal.
>
> Question: Is it actually feasible to do this in the real world?
>
> If I have an image with camera shake, can you really apply some math to  
> it and get back the unblurred image? Or is that still the domain of  
> science fiction?

http://www.focusmagic.com/



-- 
FE


Post a reply to this message

From: Kevin Wampler
Subject: Re: Deconvolution
Date: 6 May 2010 14:50:00
Message: <4be30f58$1@news.povray.org>
Invisible wrote:
> Echo, focal blur and motion blur are all instances of convolution. That 
> means, hypothetically, that by applying a suitable *deconvolution*, you 
> should be able to get back the original signal.
> 
> Question: Is it actually feasible to do this in the real world?
> 
> If I have an image with camera shake, can you really apply some math to 
> it and get back the unblurred image? Or is that still the domain of 
> science fiction?


The hardest part in practice is determining the blur kernel.  Even if 
you can determine it exactly the result still won't be perfect, but it 
will be noticeably (potentially significantly) deblurred (at least for 
camera shake, defocus works less well).


Post a reply to this message

From: Darren New
Subject: Re: Deconvolution
Date: 6 May 2010 15:28:27
Message: <4be3185b@news.povray.org>
Kevin Wampler wrote:
> will be noticeably (potentially significantly) deblurred (at least for 
> camera shake, defocus works less well).

I would think the kernel for defocus would be different at each pixel, 
depending on the original depth from that pixel through the lens to whatever 
you're seeing there, yes?  Camera shake is probably easier because all the 
pixels are going to be blurred with essentially the same convolution (modulo 
camera rotation about the axis of the lens).

-- 
Darren New, San Diego CA, USA (PST)
   Linux: Now bringing the quality and usability of
   open source desktop apps to your personal electronics.


Post a reply to this message

From: Kevin Wampler
Subject: Re: Deconvolution
Date: 6 May 2010 15:45:11
Message: <4be31c47@news.povray.org>
Darren New wrote:
> Kevin Wampler wrote:
>> will be noticeably (potentially significantly) deblurred (at least for 
>> camera shake, defocus works less well).
> 
> I would think the kernel for defocus would be different at each pixel, 
> depending on the original depth from that pixel through the lens to 
> whatever you're seeing there, yes?

Indeed, but even if everything was all at the same depth the kernel of a 
defocus filter tends to be shaped such that reconstruction is less 
accurate due to floating-point resolution issues (although since the 
kernel is generally simple it's much easier to implement).

If things are at different depths then as you say it's a harder problem. 
  Ditto for motion blur when parallax matters or there are independently 
moving or non-rigid objects in the scene.


Post a reply to this message

From: scott
Subject: Re: Deconvolution
Date: 7 May 2010 03:42:13
Message: <4be3c455@news.povray.org>
> No. Only if everything in the frame is at approximately the same focal 
> distance does it approximate a 2D convolution.

I doubt that happens very often, usually the camera gets a point in focus 
you didn't intend (and the bit you did intend is then out of focus).

> If the motion is "small" relative to the distance of the objects from the 
> camera, then the blur should be approximately a 2D convolution.

But is it accurate enough to visibly improve the sharpness of an image? 
Judging by all the software I've seen that claims to do this, usually not.

> This merely means that you can't deconvolve the edges properly.

True, more precisely a region half the size of the convolution kernel along 
each edge.

> A much bigger problem is figuring out what the hell the convolution kernel 
> might have been, given only the blurred image...

Indeed, and it might not be constant for every pixel.


Post a reply to this message

From: Invisible
Subject: Re: Deconvolution
Date: 7 May 2010 04:00:02
Message: <4be3c882$1@news.povray.org>
>> Question: Is it actually feasible to do this in the real world?
> 
> http://www.focusmagic.com/

Judging by the demo images... it's feasible, but the results aren't 
worth it.


Post a reply to this message

From: Invisible
Subject: Re: Deconvolution
Date: 7 May 2010 04:03:40
Message: <4be3c95c$1@news.povray.org>
scott wrote:
>> No. Only if everything in the frame is at approximately the same focal 
>> distance does it approximate a 2D convolution.
> 
> I doubt that happens very often, usually the camera gets a point in 
> focus you didn't intend (and the bit you did intend is then out of focus).

No, as demonstrated, the problem I usually have is that my camera's 
optics physically can't focus near enough. That blurry image I posted is 
of a flat piece of ground. The focal depth is probably near-identical 
everywhere. (Except that I think the ground plane might be tilted 
relative to the camera...)

> But is it accurate enough to visibly improve the sharpness of an image? 
> Judging by all the software I've seen that claims to do this, usually not.

OK. That's kind of what I was asking. DSP theory says it can be done, 
but are the results worth it?

(DSP theory also says that a perfect deconvolution would require 
infinity gain at certain frequencies. You just *know* that's not going 
to work well in the Real World.)

>> This merely means that you can't deconvolve the edges properly.
> 
> True, more precisely a region half the size of the convolution kernel 
> along each edge.

For the image I'm thinking of, that wouldn't matter. The bit I want is 
the person's head in the center.

>> A much bigger problem is figuring out what the hell the convolution 
>> kernel might have been, given only the blurred image...
> 
> Indeed, and it might not be constant for every pixel.

I suppose if it changes sufficiently slowly, it might still be possible 
to estimate... maybe...


Post a reply to this message

From: scott
Subject: Re: Deconvolution
Date: 7 May 2010 04:15:00
Message: <4be3cc04@news.povray.org>
> (Except that I think the ground plane might be tilted relative to the 
> camera...)

So each point will have a different convolution kernel...

Maybe if you thought about the optics of your camera you could derive an 
approximate kernel as a function of depth and focal distance, you could then 
apply this for each pixel using some trial&error method to get the sharpest 
image (or some other method).


Post a reply to this message

<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.