Log in

View Full Version : Mathematically comparing frames?


Comatose
8th June 2008, 21:51
So, I have two clips and I want to check if frames in them changed. Any idea how I could do that?

Basically - (last!=selected)?black.subtitle("Frame changed",align=5,size=48):black.subtitle("Frame not changed",align=5,size=48)

Except that doesn't work :p
The frames would be mathematically identical if they haven't been filtered, since they're both coming from the same source. I'm not comparing two different encodes.
I'm using SCSelect and I want to keep an eye on which frames it changes, but I want to make it easy for me :3

Thanks for any help =o

Zarxrax
8th June 2008, 22:02
The Compare() command lets you compare 2 clips to see if there are any differences.

Edit: nevermind, I think i misunderstood what you are asking.

mikeytown2
8th June 2008, 22:08
The first thing that comes to mind is using Subtract (http://avisynth.org/mediawiki/Subtract) with Dup (http://neuron2.net/dup/dupnew.html). The clip should be gray and when anything changes Dup should pick it up and display the change. Plus it will give you a percentage of change which is nice.

Didée
8th June 2008, 22:34
You're coming from here (http://forum.doom9.org/showthread.php?p=1140719#post1140719), yay?

Why even bother with doing comparisons? If it's only for tracking the activities of SCSelect, you can simply do this:

prev = source.selectevery(1,-1) .subtitle("Frame changed by SCSelect!",align=5,size=48)
next = source.selectevery(1,1) .subtitle("Frame changed by SCSelect!",align=5,size=48)
source.SCSelect(next,prev,source,dfactor=2.0)
;)

Comatose
10th June 2008, 12:13
Yes, I am D:

Also, facepalm. Oh the ignorance :| Thanks!