The collision *detection* is done by OpenCV. The rebound angle, I’m glad to say, I wrote myself in good old C…basically just add up all the vectors from silhouette pixels (within a certain radius) to the collision point and take the average to get a surface normal vector…the rest is an exercise for the reader.
You ported OpenCV objects to QC, or is that happening ’somewhere else’ (the video being run through a separate digitizer, analyzed on the CPU and sent to QC maybe via OSC or something)? Or are you using the kinome QC / CV objects ? Just curious !
I use an OpenCV.framework within my consumer QCPlugin. The custom patch takes an image (in which every pixel is 0 or 1, created with QC image filters, and the Video Input patch) and does all the rest of the work through drawing the particles with OpenGL (and making sounds when there are collisions, which you can’t hear in the video).
Comment by stolrsky — February 20, 2008 @ 12:37 pm
Hey, very cool. How are you doing the collision detection? Id love to know!
Comment by vade — February 19, 2008 @ 2:06 pm
The collision *detection* is done by OpenCV. The rebound angle, I’m glad to say, I wrote myself in good old C…basically just add up all the vectors from silhouette pixels (within a certain radius) to the collision point and take the average to get a surface normal vector…the rest is an exercise for the reader.
Comment by stolrsky — February 19, 2008 @ 3:54 pm
You ported OpenCV objects to QC, or is that happening ’somewhere else’ (the video being run through a separate digitizer, analyzed on the CPU and sent to QC maybe via OSC or something)? Or are you using the kinome QC / CV objects ? Just curious !
Comment by vade — February 20, 2008 @ 1:49 am
I use an OpenCV.framework within my consumer QCPlugin. The custom patch takes an image (in which every pixel is 0 or 1, created with QC image filters, and the Video Input patch) and does all the rest of the work through drawing the particles with OpenGL (and making sounds when there are collisions, which you can’t hear in the video).
Comment by stolrsky — February 20, 2008 @ 12:37 pm