Categories
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).

Categories
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.

Categories
code ffmpeg graphics programming video

FFMPEG video writer – now with animated GIF support [w/ code]

rect3825So animated gifs are awesome if you’re writing a software blog. It saves all this time working with YouTube embeddings and stuff, and your “videos” are stored locally. The simplified FFMPEG writer was before unable to output animated GIFs, but I’ve tweaked it and now it does. It’s also a nice piece of code to learn how to FFMPEG in C.

Categories
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,

Categories
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.

Categories
code graphics opencv programming

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

Hello,
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

Categories
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.

Categories
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.

Categories
3d code graphics gui opengl programming qt Recommended Software

How I fell for QGLViewer for my Qt/OpenGL projects [w/ code]

While looking for a very simple way to start up an OpenGL visualizer for quick 3D hacks, I discovered an excellent library called libQGLViewer, and I want to quickly show how easy it is to setup a 3D environment with it. This library provides an easy to access and feature-rich QtWidget you can embed in your UIs or use stand-alone (this may sound like a marketing thing, but they are not paying me anything 🙂
This is based on the library’s own examples at: http://www.libqglviewer.com/examples/index.html, and some of the examples that come with the library source itself.
Let’s see how it’s done

Categories
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.