Log in

View Full Version : possible plugin to refocus image


morsa
24th June 2003, 01:40
Go and see it by yourself!!

http://refocus-it.sourceforge.net/
Coupled with an ad-hoc noise reductor this could be great.

bilu
24th June 2003, 09:14
Seems great. :)

Macanudo
25th June 2003, 02:10
Morsa,

Is this a Deconvolution style plug-in like the discussion in the following thread?
http://forum.doom9.org/showthread.php?threadid=33684&highlight=deconvolution

If so, I can't wait to plug it into The Gimp and give it a try.

Thanks for the link.

Like I stated in the above mentioned thread, I hope that some talented avisynth developer adapts it to Avisynth 2.5.

Thanks Again,
Macanudo

morsa
25th June 2003, 05:43
EXACTLY!!!
And it is very easy to use.Terribly fast.Great results with only one iteration.
I just hope Tom Barry or Neuron2 read this.....

Sigmatador
25th June 2003, 08:35
"Terribly Fast" are you kidding? it's a deconvolution !

morsa
27th June 2003, 03:13
If someone is interested there ia another filter for Gimp that performs a wiener deconvolution with nice results.Applying it only on luma seems to be the right choice.


http://refocus.sourceforge.net/

fleebitten
10th August 2007, 22:34
It's been 4 years since the last post. Has anybody tried porting one of these deconvolution plug-ins to Avisynth? Especially 'refocus' as linked to by Morsa below.

I have 8mm films that I'm capturing frame by frame and the original films are slightly out-of-focus due to a faulty focus ring on the camera. Ideal for deconvolution. Single frames taken into Photoshop and processed with Focus Magic look good.

EDIT:
I've uploaded a web page with a couple of example frames of 8mm film sharpened by deconvolution using the Focus Magic plug-in for Photoshop.

An Avisynth plug-in giving these results would be very nice -- even if it took hours to process a 3 minute film. After all, what's the hurry?

http://www.royalbox.plus.com/video/fm.html

rfmmars
11th August 2007, 06:07
I resized your raw 2000x1500 photo down to 640x480 for the test. I am not an expert on SeeSAW so I am sure it can be better. The info on the top panes is incorrect, its your Focus Magic shots that are being compared, not the raw.

http://img143.imageshack.us/img143/9396/resharpingmf2.th.jpg (http://img143.imageshack.us/my.php?image=resharpingmf2.jpg)

Below is the link for my AVS-P script.


http://forum.doom9.org/showthread.php?t=93571&page=10&highlight=rfmmars


Richard
photorecall.net

foxyshadis
11th August 2007, 11:27
Another 2003 thread on the same topic was already revived, and Didée did a good job of explaining why deconvolution is a red herring (http://forum.doom9.org/showthread.php?p=941214#post941214) to be chased fruitlessly.

Like weather prediction, it's a non-linear function that needs to solve for thousands of unknowns of a single equation (the new image), only the data is trash by the standards of the math needed to implement it, so that you rarely get a better result than a dumb sharpen. Sublime old-fashioned sharpeners aren't just many times faster, but as rfmmars shows, they can improve your input quite a bit more.

(Another stab (http://forum.doom9.org/showthread.php?t=120496) at it, this one aimed at something traditional sharpening can't do.)

fleebitten
11th August 2007, 12:07
@rfmmars
Thank you for taking the time to do that.

As I'm sure you know, to do a proper comparison we'd need to start with the original uncompressed image at full size as I used with focus magic.
The info on the top panes is incorrect, its your Focus Magic shots that are being compared, not the raw.
I'm pretty sure that's the raw unless it got severely blurred on resizing, but that's no problem.

As a new AviSynth user, looking at that script left me cold! There's a lot going on there. Looking though it appears to be aimed at something that needs more work doing, like a VHS tape or something like that. I'm sure I saw at least 3 de-noiser plug-ins, deinterlace (which I don't need to do), colour space conversions, de-grainer, white balance etc.

I'm a 'less is more' kind of a person really. I just need to adjust levels, colour, and sharpen (de-blur really) this particular footage.

Thanks once again for your help.

fleebitten
11th August 2007, 12:14
@foxyshadis
Thanks for replying.
I have to disagree with you about deconvolution only because of the results I'm getting with focus magic which I have been unable to get with other methods -- including various photoshop plugins. I haven't yet tried Avisynth sharpening plug-ins or scripts yet as I've only just started using/learning about it. I've tried various Virtualdub plug-ins though without the results I'm after.

Maybe it's because my footage really is out-of-focus that makes deconvolution suited to it.

I will follow and read your links though.
Thanks again.

krieger2005
11th August 2007, 12:43
http://forum.doom9.org/showthread.php?t=122443

foxyshadis
11th August 2007, 13:53
Have you ever tried PhotoKit Sharpener (http://www.pixelgenius.com/sharpener/)? The super sharpen included in it produces results similar to limitedsharpen, but for quite a price.

Then again, Focus Magic never really impressed me, it just looks like limitedsharpen+warpsharp to me. It's rather of a matter of personal taste which 'look' is less fake and more appealing, I guess.

fleebitten
11th August 2007, 15:27
@krieger2005
Hmm... Just been playing around with that. Seems to turn my video into what looks like a water-colour painting or something like that. Played with the parameters but certainly couldn't get it to sharpen. I don't understand that one, I'm sure it's just me.
Thank you though.

@foxyshadis
I haven't tried PhotoKit Sharpener, I'll try the demo. Now that I'm getting more used to using Avisynth I suppose I can try some other sharpeners for that.

Anyway, it's clear that there's no work going into the deconvolution method anyway -- apart from the motion blur type linked to earlier by foxyshadis -- so that answers my main question.

Thanks a lot everyone.

rfmmars
11th August 2007, 18:38
As a new AviSynth user, looking at that script left me cold! There's a lot going on there. Looking though it appears to be aimed at something that needs more work doing, like a VHS tape or something like that. I'm sure I saw at least 3 de-noiser plug-ins, deinterlace (which I don't need to do), colour space conversions, de-grainer, white balance etc.

I'm a 'less is more' kind of a person really. I just need to adjust levels, colour, and sharpen (de-blur really) this particular footage.

Thanks once again for your help.

Yes you can just take part of it but I would start with the whole and wittle it down for your needs.

There is no process that fits all.

Richard

morsa
12th August 2007, 07:07
Yeap, it is so dead that now Microsoft is doing more work with it.

http://www.microsoft.com/presspass/features/2007/aug07/08-06siggraph07.mspx

Here is a video.Nice to see

http://research.microsoft.com/users/jiansun/videos/Deblurring_long.wmv

foxyshadis
12th August 2007, 07:57
Deconvolution for scientific and industry images is different, the biggest being that the data is completely uncompressed. Lossy compression eliminates those tiny redundancies that deconvolution needs to go from gimmicky to useful. They're also generally in higher bit depths, 10, 12, or 16, and have multiple exposures to minimize noise or obtain non-visible detail.

(You can essentially create uncompressed by shrinking an image enough, but that'll also probably sharpen it up sufficiently anyway.)

The specific topic there is certainly interesting, but it's still based on that fact that multiple exposures give you significantly more detail than a single one, which is all you have.

If there is a major breakthrough, I'll eat my words of course, but in the meantime I'm reluctant to see much hope based on the last ten years of papers on the topic.

morsa
12th August 2007, 12:53
Well, I guess that most of the interested people here, if I don't remember wrong is somewhat related to scanning/telecining old 8mm, S8mm, or whatever.
In that case I may assume that their stuff is uncompressed.
If Avbisynth 3.0 development continues at a steady pace, there will be the possibility of being able to work with higher than 8 bit per colour channel.
So, at leat, on that situation, deblurring would be handy.
I clearly know and understand that doing a deconvolution on a XVID feature length movie is a nonsense.

Myrsloik
12th August 2007, 13:46
I present to you the Halo Maker 3000 Deluxe (http://ivtc.org/new/hm3kd.arj) as seen on Jerry Springer!

Leak
12th August 2007, 14:07
I present to you the Halo Maker 3000 Deluxe (http://ivtc.org/new/hm3kd.arj) as seen on Jerry Springer!
Okay, so I was too scared to actually try this out right now, but the documentation alone is comedy gold... :D

np: Pan Sonic - Virta 1. / Current 1. (Katodivaihe / Cathodephase)

CruNcher
15th August 2007, 01:24
Hehe actually as morsa posted allready Microsoft Research found a nice way against the Haloing :)