opencv

CV tools head tracking and rotations.

dust's picture

so here is a snow leopard composition where im using my trackball to infer rotation based on the haar classification system. im glad the haar patch is working woot woot.

if you align your head to be in the middle of the camera frame you will be able to control the 3d model much better with facial recognition. if you want the model to follow you around hook up the xy to the models position and offset the origins so the rotations don't get messed up. you can infer a pseudo z depth by interpolating the product of the width and height as well. its a bit jumpy so i tried to smooth things out.

actually this got me all excited that cv tools is working with snow leopard in 64. i'm actually re-building a haar kit for snow leopard. i guess open cv is still using carbon based methods which took a bit to figure out, i need to be using gcc+4.0 compiler not 4.2. so i got that sorted now i need to figure out how to get open mp running so i can compile a multi thread haar kit to take advantage of the core2duo+. maybe there is a way i can use open CL and the LLVM compiler to make a haar kit. i think that would be much faster.

anyways when i get a working kit finished or compiled for SL. i will share it so you can do rapid object detection and other recognition stuff other than just facial, maybe gender recognition, hand recognition. could be cool to take photos of everything in my house and build a iphone cv program to guide me through my house blindfolded, i guess i would need an iphone for that though.

anyways here is how you can use facial tracking to do rotations etc... there are other methods for doing this like using the distance between the eyes to calculate rotation as well.

cvtools - point - flow clear points (Composition by gtoledo3)

Author: gtoledo3
License: (unknown)
Date: 2009.10.09
Compatibility: 10.5, 10.6
Categories:
Required plugins:
(none)

This is an example of a way to clear points easily using CVTools. This is one of Kineme's CVTools examples with an added point clear function.

Hold delete and right click (eg., "one finger click") to clear points.

Please note licensing for clear function, cough cough. This is a MUST. :)

*Also, many thanks to Kris Harris for his useful alternative clear points setup, posted when discussing OpenCV some time ago. He inspired me to find a different way to achieve the same function, so that I could ultimately induce people into buying me coffee in a subversive way, through my use of an idiosyncratic licensing agreement. Thanks, Kris. *

Release: CVTools, v0.2

Release Type: Production
Version: 0.2
Release Notes
  • Added 64bit build, supporting QC4 on Snow Leopard.
  • Cleaned up patch names and descriptions.
  • Fixed occasional crash when working with images not reduced to grayscale.
  • Fixed issues with lazy evaluation of some patches.
  • Removed a few broken patches (SubPix Adjuster, CV Camera, Image Splitter).
  • Some performance improvements.
  • Added sample compositions.

Please note that the plugin is now called CVTools.plugin (not OpenCV.plugin as in the previous beta release). Be sure to delete the old OpenCV.plugin.

Release: CVTools, v20080207

Release Type: Beta
Version: 20080207
Release Notes

This is the initial beta release of our OpenCV Plugin.

There are some performance improvements over the previous Alpha, as well as some functionality improvements and bug fixes.

It's now possible to control how QC images are flipped when converting to OpenCV.

You can also add additional points to the optical flow patch without destroying its previous input. Currently, I do this with the Structure Maker patch (because it's already written), but if y'all think an OpenCV-Specific patch would be appropriate, I can make that too.

The OpenCV Camera input was disabled (It's impossibly slow on Intel macs, and it hangs on ppc macs). Placing such a patch in your composition will not do anything.

Added cvFindChessboardCorners -- this is a prerequisite for camera undistortion (unavailable currently), orientation (also unavailable), and perhaps POSIT stuff too (unavailable). If you're familiar with the OpenCV API, or know how to turn a collection of Chessboard Corners into a useful structure for other OpenCV functions, please let me know (I'm struggling a bit to figure out how it works.. the cv demos that use these function just produce garbage for me)

PPC may have some colorspace issues (blue/red tints), please let me know and supply examples so I can test better.

This is a 32-bit only plugin for now, so it won't work in 64-bit applications/runtimes.

Both provided demos require the GLTools plugin, and benefit from the YUV Colorspace plugin. The VideoTrack demo also requires the Structure Maker Plugin for live input. These dependencies are just because I was lazy and didn't feel like swapping everything out to QC-built-in stuff.

Face detection kind of works, but it's so slow you have to use swear words to describe it ;) It's also a bit wonky sometimes, even with identical input to the demos... still looking into that.