| Printable Version of Topic
Click here to view this topic in its original format |
| Unofficial VirtualDub Support Forums > VirtualDub Filters and Filter Development > Refocus Filter |
| Posted by: AnnaFan777 Sep 23 2008, 08:54 PM |
| any chance of a Vdub filter like this? it works magic.. http://refocus-it.sourceforge.net/ |
| Posted by: sonical Sep 27 2008, 03:29 PM |
| Have to find a non-lazy programmer for this in the first place Actually a boxblur filter could have an inversion switch so it boosts high frequencies instead of attenuating them. Just a thing of a minus sign. It wouldn't give that much of re-focusing magic, however, but will be better and stronger then "sharpen" filter for sure. |
| Posted by: phaeron Sep 28 2008, 06:51 PM |
| The necessary operation here is a lot more complicated than that. What you're describing is typically known as "unsharp mask," but this is a deconvolution operation. To do a deconvolution, you need to convolve with an inverse kernel, which is produced by inverting the response of the point spread filter (PSF) in frequency space. I believe the inverted form of a separable PSF is still a separable kernel, but it won't be as fast as a box blur -- most likely O(N) instead of O(1) in the kernel size. It can, however, give you much better results than an unsharp mask. This assumes that the PSF is known, however. It isn't always a pillbox, and otherwise you're dealing with the blind deconvolution operation, which is considerably more difficult. It looks like the refocus filter has an iterative algorithm to deal with this. |