code ffmpeg graphics opencv video vision

Extending the hand tracker with snakes and optimizations [w/ code, OpenCV]

I wish to report of a number of tweaks and additions to the hand silhouette tracker I posted a while back. First is the ability for it to “snap” to the object using a simple Active Snake method, another is a more advanced resampling technique (the older tracker always resampled after every frame), and of a number of optimizations to increase the speed (tracker now runs at real-time on a single core).

graphics opencv video vision

OpenNI 2.x and OpenCV interoperability [w/ code]

For those of you using OpenCV that are looking to upgrade from OpenNI 1.x to the new OpenNI 2.x, here’s a bit of code to make life a tiny bit easier. It simply wraps the OpenNI 2.x APIs to expose a simple frame grabber for OpenCV.

code graphics opencv programming video vision

Curve tracking with a Heap&Hogg's Particle Filters [w/ code, OpenCV]

Screen Shot 2013-03-15 at 6.18.30 PM I wanna share some code for 2D curve tracking with a particle filter, implementing the body of work of Tony Heap and David Hogg. These guys presented a relatively easy to implement method for tracking deformable curves through space and change in form using a Hierarchical Point Distribution Models (HPDM), which is another elegant way to store shape priors. Granted, it is not perfect, but for a simple 2D shape like a hand it works pretty good, and rather fast as well.
Let’s dive in then,

code graphics opencv programming video vision

Skin Detection with Probability Maps and Elliptical Boundaries [OpenCV, w/code]

maskSharing a bit of code I created for skin detection.

code graphics opencv programming

Shape manipulation with Moving Least Squares for curves [w/ code]

I wanna share some code I’ve been working on lately that implements smooth shape manipulation using Moving Least Squares. More specifically, the excellent simple and powerful method by Schaefer et al. from Texas A&M and Rice universities (great paper). The method was written for image deformation but very straightforward modifications made it work perfectly for 2D shapes and open curves.
Let’s get down to business

code graphics opencv programming school vision work

2D curve matching in OpenCV [w/ code]

Just sharing some code and ideas for matching 2D curves. I was working for a while on matching 2D curves to discover shapes in images, but it didn’t work out, what did succeed is this 2D curve matcher that seems to be very robust for certain applications. It’s based on ideas from the Heat Kernel Signature and the CSS Image (that I introduced in my latest post), all around inspecting curves under different level of smoothing.

code graphics opencv programming school

Resampling, Smoothing and Interest points of curves (via CSS) in OpenCV [w/ code]

I’m so glad to be back to work on a graphics project (of which you will probably hear later), because it takes me back to reading papers and implementing work by talented people. I want share a little bit of utilities I’ve developed for working with 2D curves in OpenCV.

3d code graphics opencv opengl programming vision

Head Pose Estimation with OpenCV & OpenGL Revisited [w/ code]

So I was contacted earlier by someone asking about the Head Pose Estimation work I put up a while back. And I remembered that I needed to go back to that work and fix some things, so it was a great opportunity.
I ended up making it a bit nicer, and it’s also a good chance for us to review some OpenCV-OpenGL interoperation stuff. Things like getting a projection matrix in OpenCV and translating it to an OpenGL ModelView matrix, are very handy.
Let’s get down to the code.

3d code opencv

Checking for co-planarity of 3D points in OpenCV [w/code]

Just catching up on some bloggin, and I wanna share a snippet of OpenCV code on how to check if your (badly) triangulated 3D points came up co-planar, and therefore a botch triangulation. It’s a very simplistic method, only a few lines, and it also is part of my Structure from Motion Toy Library project.

3d code opencv vision

Decomposing the Essential matrix using Horn and Eigen [w/code]

I’ve been working feverishly to straighten up the Structure from Motion Toy Library, and make it more robust. During my experiments with different methods I wanted to test out a different method for decomposing the Essential matrix to rotation R and translation t, other than that of Hartley and Zisserman using SVD. That’s when I came upon this paper: here by Berthold Horn from 1990, that traces the steps of Longuet-Higgins who came up with the derivation for the Essential matrix. It has a closed form solution that works pretty well, and here it is implemented with the Eigen math library (a very good library to get to know).