Help with Interaction

silvergasgas's picture

Hi all I am new to qc and i need some help, I need an effect that uses optical flow to track hand movement on a table and an an image to pop up when it hand hits the right point on the area. I hope you can point me in the right direction and any help would be grateful Thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

robbietherobot's picture
Re: Help with Interaction

You need to use hit test.

Comp attached.

PreviewAttachmentSize
HitTest.qtz6.6 KB

gtoledo3's picture
Re: Help with Interaction

I started writing a real long answer on this yesterday, and must have forgot to post!

If the target is going to be in the same general area, you can crop it out of your main video feed, use area average to get the average color, and Image PixelS to detect the color values. Then, you can set a conditional threshold so that when the color of the area changes (because now there's a hand there), your object of interest appears.

Using an optical flow filtered image of your area of interest will make your color value change more "solid" and happen only when there's movement. If the scenario is well lit and controlled, you may not need that, or it may make no difference. However, when your hand comes into frame, it will make a red/green burst (typically), so by detecting that pixel color change, you can "know" the hand came into frame.

jersmi's picture
Re: Help with Interaction

Re: needing to use the hit test patch, there is more than one way. For ex., you can also use a sprite with conditionals for x and y position, with conditional tolerances of width/2 and height/2 for "rollover" state. (the sprite is convenient for visual display of hit state). Here's an example for playing a movie with a rollover. Could easily replace movie importer patch, etc.

PreviewAttachmentSize
HitState000.qtz59.76 KB

dust's picture
Re: Help with Interaction

there are a bunch of ways to track your hand. right now i'm finding the kinect to be pretty awesome. i have been using jstreker and smorkis's centroid color tracker in qc to track just my hand blob. if your on a table just use ccv or something similar to send data to qc via tuio. then use the hit test patch and a multiplexor for interactions would be the easiest way.