View Single Post
Old 21st May 2008, 18:19   #14  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
LaTo, that ain't work at all. Functions of Avisynth's conditional environment can only be used - you guess it - in Avisynth's conditional environment.

Besides, a simple thresholded difference to the previous frame isn't smart enough. That diff might be rather low e.g. in dark scenes, and might be rather high e.g. in pannings, explosion scenes and such, yielding to frame freezes in places where you definetly don't want them.
This method has been used already yeeaars ago. The result is it works in some places and in some not. High thresholds will miss many scenechanges, low thresholds give many false detections. In between, you get a mix of both.

I'd rather try try examining the 2nd derivative ... example: look at the diff-to-previous over three frames. If the middle one is reasonably bigger then the surrounding two ones, then a scenechange is likely. To be sure, take a 5-frame window, and evaluate the proportion of the diff-of-differences at the start & the end of that window to the one in the middle.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 21st May 2008 at 18:23.
Didée is offline   Reply With Quote