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.

3 comments:

Anonymous said...

f

Anonymous said...

Can binaries compiled in this way be run in linux boxes?

adam said...

Sure, more or less the same thing will work on Linux.

BTW, check out http://sensr.net if you want to see where this playing with OpenCV went. :-)

Post a Comment