Log in

View Full Version : Depan improvement, Deflicker


lisztfr9
29th November 2012, 11:09
Hi,

1) Regarding Depan, DepanStabilize, the problem is to discriminate between motions that belongs to the movie and those belonging to artifacts. For example in Tony Scott's "Man on fire" and all these advertising-like style movies : the whole image is constantly in move, like shaking, but it isn't ! So imho, DepanStabilize could be improved by a) noticing 1-2 frames shaking, b) giving a maximal value to motion speed being compensate, as it has a value for amplitude. Maybe i'm totally wrong.

2) This is an interesting mathematical function, certainly in use in avisynth :

http://en.wikipedia.org/wiki/Linear_regression

Nothing new for sure, but maybe more often needed as thought. In fact, this is far superior to the mean function since it include the drifting factor of the variable. Even for a simple deflickering function : Taking into account only 3 frames isn't OK since 2 of these could have wrong luma, so the mean would be wrong. Also the mean function on larger amount of frames would created gapes in the luma function. So one need the differential function of the luma in order to deflicker.

Thanks for reading, L

lisztfr9
30th November 2012, 20:24
After some reading, i fund that 'mean' y belongs to the ax + b = y linear regression line, so the mean value is Ok. :)

martin53
30th November 2012, 21:16
lisztfr9,
in other threads I wrote about my experiences with deshakers.
Gunnar Thalin's Deshaker for VirtualDub is quite smart regarding the problem you mention: it does not take the global mean motion in account for motion estimation, but just blocks it recognises as relevant.

However, I do not prefer that approach, because it is sensitive against not recognizing the same objects all over the scene and thus hopping from compensating one motion to another.

On the other hand, it is possible to use MDepan for motion estimation, but Deshaker for compensation. This produces very good results, since Deshaker also does not compensate by the mean value, but keeps the image more stable. This is only possible because Deshaker reads in the complete motion data for the whole clip at the start, thus 'knows the future'. DepanStabilize is only an alternative if you refuse 2 pass deshaking, or using VirtualDub plugins in AviSynth.

lisztfr9
30th November 2012, 21:55
@martin53

Ok Martin thanks, i tried Deshaker before Depan. With TV you have this typical 1-2 frames just jumping along X for 1-4 pix amplitude. I didn't succeed in getting ride of it... But this is relative easy to detect 1) the motion is very fast, and concern the whole frame, and only X.