Thursday, January 8, 2009

Started Playing with OpenCV

I started playing around with OpenCV, the Open Computer Vision library today. I'm hoping to be able to derive interesting images from my web cameras. The above image is simply the result of running the hello-world.cpp program over the image from an earlier blog post.

It's pretty easy to install on the mac:

% sudo port install opencv
And then to compile:
% g++ `pkg-config --cflags --libs opencv` -o hello-world hello-world.cpp
And then to run:
% ./hello-world test.jpg
It pops up a window showing the inverted image and waits for a keypress before cleaning up.

Post a Comment