Wednesday, March 21, 2012

OpenCV Processing

I discovered something thats quite annoying when working with OpenCV and Processing, so I'll share here. Hopefully you can get it running without searching around.

To get OpenCV working with Processing, just follow the steps on then OpenCV website.

Then use the example given on Sparkfun, to get Face Tracking working. But, if you're like me, you'll probably run into the same problem. You try to compile, and Processing throws an error: 


Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: hypermedia.video.OpenCV.capture(III)V 

This has to do with the following line of code:

opencv.capture( width, height );

Solve this error by copying the following files into your System32 folder.

cv100.dll
cvaux100.dll
cvcam100.dll
cxcore.dll
cxts001.dll


If copying them into the System32 folder doesnt work, copy the files into the WINDOWS folder. Thats it!

Note: Heres the forum thread where I discovered this solution.


Your example should work without you having to reload Processing. If you dont get any video feed, then the problem is with your Camera setup, not with Processing or OpenCV. In the past, I had a Logitech camera work on the fly (thats using Windows 7, x64bit), but now Im working with a Microsoft camera that I havent figured out how to get working. I'll post when I do.

1 comment:

  1. I copied the 4 files on both system32 and windows. but the error message still emerges...
    anyway thanx for the direction.

    ReplyDelete