Installing OpenCV for Processing in Eclipse on a Mac
August 11, 2011 § 4 Comments
A tutorial on how to install the Open CV library for Processing in Eclipse on OSX.
( After going through the painful process of figuring out how to do this twice, I decided to write up the steps, for personal reference and to hopefully help anyone else out there in this unique predicament. Note: I am running OSX10.6.8 . )
(This presumes you already know how to run a normal processing sketch from eclipse.)
- Download opencv-framework-1.1.dmg and install it.
- Download the OpenCV Processing Library and unzip.
- Copy both OpenCV.jar and libOpenCV.jnilib to /System/Library/Java/Extensions/
- Now, Locate your Processing’s core.jar and also copy it to /System/Library/Java/Extensions/
- Ensure that any java project you run, runs in 32-bit mode. Do this by Right-Clicking your Project > Run Configurations > Arguments Tab > VM Arguments: “-d32″ (without the quotes).
Now you’re all set up, you should be able to try out some introductory opencv tutorial.
[ These instructions were compiled from the following sources:
Update:
Some additional notes:
[4], Processing’s core.jar file can be found (in OSX), by Right Clicking the Processing App > Show Contents > Resources > Java > core.jar.
[5], Right-Click on a Java Project you created in Eclipse, usually found in the left-navigational panel.
Here is a processing_template.
THANK YOU!!!
You rock my socks.
Hello,i am new to this.Can you elaborate a bit more about steps 4 and 5,i.e.where do i download processing’s core.jar from.Can you also a give a small working example which i can just copy in eclipse and run……Thank You
Sorry for the late response Najeefa, I’ve updated the post, a long with a processing template that can be imported into eclipse. Hope that helps.