View Single Post
Old 30th January 2015, 18:38   #6  |  Link
Chthon
Registered User
 
Join Date: Dec 2012
Posts: 6
Quote:
Originally Posted by foxyshadis View Post
I don't think that's ever possible, since there's no basis to compare any frame to.
Thanks for the reply. I was afraid that was the case, but hoping I was wrong.

I've put some thought into it, and I think I may have a solution. I'd greatly appreciate it if someone could sanity check this idea before I waste time trying to implement it:

My mind's eye pictures the frames I want to recover as a series 180 degrees out of phase with the frames I have, like so:
Code:
A   B   C   D   E   F <- have these
  v   w   x   y   z   <- want these
Is that correct?

Assuming that whoever made this mess used a naive blur function, then the frames I have should be a simple average of the adjacent frames I want. E.g., B=(v+w)/2. Correct?

Although I said there are "no good frames," that may not be literally true. What if there are two identical adjacent frames? That would give me one good unblurred frame. Then I could proceed iteratively computing each unblurred frame from its unblurred neighbor and the blurred frame between them. E.g. unblurred_frame = (2*blurred_frame) - unblurred_neighbor.

AFAIK, avisynth doesn't do "iterative," since that kind of runs counter to the whole "frameserver" concept. But, I could probably jury-rig something by dumping the frames to png and writing something to process the pngs iteratively. Then read the pngs back into avisynth.

Even if there are no identical frames, perhaps it would still work by finding pairs of very similar adjacent frames. I could approximate the unblurred frame in between by averaging such a pair. Then maybe do two passes -- one forward from the last pair and one backward from the next pair -- and average the results. That should at least reduce the blur down to the sum of 1/4 of the blur present in each pair... I think...

Someone please stop me if I'm way off on the wrong track here.
Chthon is offline   Reply With Quote