We're trying to build a QC that will take two video sources off of a server (the easy part) and composite them into one QT movie (another easy part). The hard part is switching between sources based on which source is moving. We'll also be taking ONLY the audio from the speaker camera. So, it really comes down to a way to choose which video stream to select based on which has more changing pixels.

Subtract successive frames (motion detection), then use a histogram. If the image is stationary, the low indexes of the histogram will have high values. If the image is moving, the low indexes will be lower. You'll have to do some tests to see what thresholds you should use -- I highly recommend testing _In The Environment You'll Be Deploying In_ to get accurate thresholds. smoothing and hysteresis are also good ideas, if you're feeling ambitious :)

Here's a lame example I whipped up -- no smoothing or anything, but it might be a start.

Attachment: MotionDetection.qtz
Description: application/quartzcomposer




Video Input is asynchronous, so instead of subtracting adjacent frames (t0 - t1), I added a couple frame delay with the queue; this seems to give better results on my machine since adjacent frames can sometimes be identical.

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to