Detecting frame changes efficiently
Bryan McCormick
bryan at deepfoo.com
Sun Jan 22 12:07:37 EST 2012
I have to cobble something together which is not normally my thing, a
video app that doesn't do a bunch. What it does need to do though is
detect when there has been a significant change in frame.
I would need to be able to threshold this for significance, so I would
need to know that xyz percentage of the frame has changed. I might not
want the app to trigger unless there has been a 90 percent change,
something like that though I am not sure yet how high that rate is going
to have to be. I will probably sample smaller frame elements to try to
keep it lighter on overhead.
My approach was to do this not with 2 frames but with 3 sampled over a
few seconds so that there would be a higher confidence that the change
isn't just frame a lighting change or something that is transient.
I already can do bit by bit stuff, but that is super super slow. I was
using RGB compares.
Does anyone have any ideas about how to do it faster? I was hoping there
might be some method to do it by rows in a still image grabbed from the
stream.
Importantly, I am grabbing the images off as stills and storing them,
then overwriting as the sample time window passes.
Thoughts?
More information about the use-livecode
mailing list