View Single Post
Old 7th April 2018, 20:21   #46  |  Link
bryrabknowles
Registered User
 
Join Date: Jun 2017
Posts: 18
Just thought I'd throw out my concept for how to fix this. Needs someone more experienced than me to implement.

First, use scene change detection to define scenes - focus on the whole rather than just the separation point.

Ignoring the first 4 and last 4 frames of the shot, Average the remaining frames.

Compare the difference between the resulting "Average" and the Middle frame of the shot.

Set a maximum difference value (even better if you can find a way to only average static portions).

If the difference value is low enough, the shot is static. Otherwise, assume a pan.

On static shots, use the average found earlier. Working backwards, check the difference of frame 4 and 5. If 4 is a bad frame, use image registration to align. Otherwise skip to 3, etc.

When all 4 frames are checked and aligned, a small clip is created, essentially In frame order for that shot, 8,7,6,5,4,3,2,1,2,3,4,5,6,7,8 (provides continual motion to better calculate vectors.

Use this clip to generate the mask to be applied to the bad frames.

For Pans, the previous clip will be examined to determine whether it is static. If so, the final two frames of the previous shot will be run through QTGMC to generate 2 motion compensated extra frames.

If both shots are pans, the previous longer step will be applied to both.
bryrabknowles is offline   Reply With Quote