howie's picture

I hoping to make a plugin to run in vdmx to detect the amount of motion in a video stream, using a difference blend of the last two frames and then sampling the brightness of the resulting image. But im having issues with inconsistent results.

In the hope of getting to the bottom of this issue - i have rebuilt the plugin as a stand alone vuo patch that plots the output value, which is attached. It rotates a square as a substitute input image - as this is at a constant speed i would expect a constant output value. But this value fluctuates between an expected reading and almost zero.

My guess is that my timing is off and the progression of the two comparison frames is out of sync - but being new to vuo i'm unsure about this.

Also there is another glitch that gives higher than expected results - this is caused by actions is other apps. Minimizing a browser for example. I guess this is causing vuo to skip a beat and results in the comparison of frames with a greater difference in time.

I'm hoping this is a noob error - as i purchased vuo for this purpose and hope its capable of the task. cheers Howie

Comments

I get a nice curve using the

Bodysoulspirit's picture
Submitted by

I get a nice curve using the difference of 2 squares (see joined MotionDetect_deBug 1), but using video frames I see what you mean about skipping frames when the computer does other things (joined MotionDetect_deBug 2).

I guess resizing the movie down, to reduce hardware load is a way to go, but here I'm testing it with a small macOS movie so it's already small.
You can also right-click on time node's output ports, and choose event throttling "Drop Events" or "Enqueue Events" and check the best results.
But I'm letting the team answer more deeply about this, too technical for me ;)

EDIT : Added MotionDetect_deBug 3 with a Smooth over the resulting value.

Brilliant the throttling on

howie's picture
Submitted by

Brilliant the throttling on the display refresh fixes the zeros in the debug patch. I hadn't tried this as the final plugin dosn't render anything - but if I drive the smooth node with a throttled display refresh it does keep the output value in sync. Still the issue of dropped frames from external influences - but i'm not sure that this can be fixed inside the patch. Many Thanks.

Still the issue of dropped

jstrecker's picture
Submitted by

Still the issue of dropped frames from external influences - but i'm not sure that this can be fixed inside the patch.

howie, are you still running into this problem with the latest version of your composition? (Based on your recent posts, I'm guessing it's evolved since the conversation here.) If so, could you post that version?

Hi Jaymie _ thanks for asking

howie's picture
Submitted by

Hi Jaymie _ thanks for asking about this. The issue is still present but we have learned to live with it. The vuo patch is attached along with a VDMX project - which sends the syphon and osc controls. If its useful to look into this from a Vuo view then it would be great to hear your thoughts but its not a pressing issue. Let me know if things need more explanation. cheers_ Howie