- The repository host Google Code stopped their services
- JavaCV team moved to github with a different package name. They have replaced the "com.googlecode.javacv.cpp." package with "org.bytedeco.javacpp."
- They ( probably OpenCV too) moved some classes here and there. eg: the static method cvSaveImage is now under org.bytedeco.javacpp.opencv_imgcodecs.cvSaveImage package. It was on com.googlecode.javacv.cpp.opencv_highgui.cvSaveImage before.
- Finally the good thing is the installation/setup steps has been easier than before. This is because they have wrapped all libraries files (dll, so ) into the platform specific jar files and we don't need to install and configure the OpenCV binaries separately
1) Install the JDK on your system.You can choose between 3 options:
- OpenJDK http://openjdk.java.net/install/ or
- Sun JDK http://www.oracle.com/technetwork/java/javase/downloads/ or
- IBM JDK http://www.ibm.com/developerworks/java/jdk/
2) Download the JavaCV binaries.2.a) Manually:
- Maven Download : http://search.maven.org/remotecontent?filepath=org/bytedeco/javacv-platform/1.3/javacv-platform-1.3-bin.zip
- GitHub URL: https://github.com/bytedeco/javacv
<dependency> <groupId>org.bytedeco</groupId> <artifactId>javacv-platform</artifactId> <version>1.3</version> </dependency>
3) Project Setup:3.a) Basic project using Eclipse/Netbeans,Intellij or other IDE
Extract the JavaCV binaries and add all the jars into your classpath.
3.b) Maven Project Setup:
If you want to use Maven you need to add the dependencies as in 2.b) in your pom.xml file. There is already a sample project available on GitHub. Download it and import into your IDE. It has a sample code to capture images from webcam.
GitHub Sample Project URL: https://github.com/gtiwari333/JavaCV-Test-Capture-WebCam
Sample Code to Capture Images from WebCam:
Happy Coding ...