OpenCV 3.3 Java Build

The new release of OpenCV 3.3 is out now. I again prepare the Java build for the CVImage Processing library use. It also includes the optflow extra module for motion history applications. Here is the list of the 3 OpenCV releases.

The book Pro Processing for Images and Computer Vision with OpenCV will be released soon. It will include the detailed build instructions in multiple platforms.

OpenCV 3.2 Java Build

In preparing for the forthcoming book in Processing and OpenCV, I have tried to build the Java binding in OpenCV 3.2. It worked easily for the basic components. Nevertheless, when I included the contribution moduleoptflow, it failed. After a number of attempts in various platforms, I found it was due to the gen_java.py script in folder opencv-3.2.0/modules/java/generator. I tried to add back the import details for the class DenseOpticalFlow. It worked again. Here is what I patch in the gen_java.py script.

For those who do not want to build it yourselves, you can download a pre-built version of the OpenCV 3.2 Java library. You can use it with Processing immediately. I have tested it with the current Processing at 3.3. It contains the following files for various platforms in 64 bit:

  • libopencv_java320.dylib
  • libopencv_java320.so
  • opencv_java320.dll
  • opencv-320.jar

Enjoy and happy coding.

 

OpenCV and Processing 1

This is the beginning of a series of posts related to using OpenCV and Processing in the Linux environment. I built the OpenCV 3.0.0 rc1 in Ubuntu. By putting the 2 files, libopencv_java300.so and opencv-300.jar in the code folder of a sketch, I can use the alpha version 3.0a7 of Processing and the official Java binding of OpenCV together to prepare for the examples of a newly proposed book in image processing and computer vision. I do not use the OpenCV for Processing library by Greg Borenstein, in order to reveal the underlying working mechanism of OpenCV for learning purpose.
 
Continue reading “OpenCV and Processing 1”