Akira-Hayasaka / ofxInkSim

openFrameworks ink/fluid deposition simulator addon.
149 stars 27 forks source link

Suggestion on flow driven brush #1

Closed eighteight closed 8 years ago

eighteight commented 8 years ago

Hi! I wonder if you could suggest how to approach the flow driven brush project. Instead of mouse drawing, I would like the brushes to be moved programmatically by optical flow.

I have a gpu optical flow implementation, and now would like to use the resulting motion texture in succeeding shaders to take the color of the source texture and apply it to the optical movement.

Do you think it would be hard to plug the optical motion and the color source textures into your approach to replace the generative brushes and their movement?

Thanks.

Akira-Hayasaka commented 8 years ago

Hmm I have some ideas for opt flow...

If you would like to use some motion with this addon, I think obj tracking is more feasible than opt flow, because we can use the contour as brush directly. I have used this addon with kinect & cv & fish, that was successfull to some extent.

eighteight commented 8 years ago

Thanks!

What do you mean by "obj tracking"? What method is that?

Akira-Hayasaka commented 8 years ago

Sorry, I just mean contour tracking using camera and openCV like this https://www.google.co.jp/search?q=contour+tracking&espv=2&biw=1016&bih=1057&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjPveyE_J3JAhVi5qYKHcvYBeQQ_AUIBigB#tbm=isch&q=kinect+contour+tracking

eighteight commented 8 years ago

Ah, yes, that's a good idea. Not sure how it would work in the footage with a lot of detail, such as leaves in the wind. Maybe non-realtime.