Moving a ball with hand

aashnaei's icon

i dont know how to make the ball go up or down by using my hand that a camera detects
please help
thanks in advance

1239.untitiled2.maxpat
Max Patch
aashnaei's icon
Dg's icon

Optical flow with cv.jit lib. ?

aashnaei's icon

yes
but i dont know how to do that
can you help me ?

Ad.'s icon

try to do it by yourself, and then you could ask more precises questions than "do it for me"…
see help patches of cv.jit.
optical flow is your friend, and then jit.gl.handle to rotate gl objects, for instance.
ad-

aashnaei's icon

this is what i got so far

1275.working.maxpat
Max Patch