Update: These instructions are also applicable for 2. I was looking for jdk-6u45-windows-i586.exe processing library for Java.
JavaCV provides jar files which can be used with OpenCV installation. Following steps can be followed to setup JavaCV with Eclipse on Windows 7. Make sure to install 32bit or 64 bit as per your processor. In System variable select path and click on Edit.
Now add following address in Variable address. If you have installed at different location please update address accordingly. Once this is done, the most important step is to Restart Windows. Download JavaCV- bin from link below and extract it. Create New Java Project ‘demo’ in Eclipse.
Go to your JavaCV Extracted folder and add all jar files. Paste following code and run the project. Put your image in project folder. In my case it is ‘img1. Do you have any idea why i get the following error when running your code?
I put “jpeg” picture, and used this file name in the code. I change “jpeg” to “jpg” in code. Put your image file in the Project Folder root instead of your “src” folder. That solved the problem for me. It looks like your code is not able to locate image which is why it is showing null pointer exception.
More specific reason can be identified by looking at code. Can’t find dependent libraries exception when run the code. I have JDK 64bit and Netbeans 7. OpenCV as you mention in the blog post. Make sure you are setting path to 64 bit opencv. Also javacv and opencv version should be same.
Don’t forget to restart system after setting path. Hi i even i m getting same error as above that is cant find dependent libraries. Can’t Dependent libraries’ issue mostly arises due to following reasons. Required opencv version can be found in readme file with javacv package. One should link 32 bit opencv libs with 32 bit javacv and 64 bit opencv libs with 64 bit javacv.