Forum

Box2d + optical flow


#1

hi all,

I want to use optical flow to applie force on my bodies, to avoid using kinect or 2d skeleton tracking.
pixelshader filter out the areas with the most movement + contour + center of movement and direction = apply force? just wild guessing here :)

@timpernagel
would you care to share how you used the optical flow to control your bodies in box2d?

have a nice day


#2

hi @schlonzo,

here is the screenshot of the part of the patch solving this task:

ofbox2d

So basically the workflow is: OpticalFlow from Camera -> Pipetting the OF-image with the center-positions of your Box2D-Objects -> Assigning the value as an acceleration to the coresponding Box2D-body

That’s it.


#3

very nice solution…

thank you!