This example will demonstrate the use of the Rect class in OpenCV and compare it with the Rectangle class in Java. The Rect class will be useful when we work on the face detection example later. The detected faces will be returned as rectangles.
Continue reading “OpenCV and Processing 4 more”
The Java binding of OpenCV has a number of data classes in the form of MatOfxxx, where xxx is other datatype such as Int, Float, Point. This example will demonstrate the use of MatOfInt class. These classes will usually be used for parameters passing between different OpenCV functions. We can manipulate it similar to array and List.
Continue reading “OpenCV and Processing 4”
This example will demonstrate the use of CvType, Size and Scalar.
CvType defines all the matrix types in OpenCV. It describes the number of channels, and depth information for each element (pixel) in the matrix. This example will use CV_8UC1 – 8 bits unsigned char, 1 channel. To communicate with Processing, we usually take CV_8UC4 for ARGB as the RGB format in PImage also uses 4 bytes for storage.
Continue reading “OpenCV and Processing 3”
I built the OpenCV 3.0.0 rc1 64-bit Java bindings and packaged into one single file. You can use it for the Processing examples. Copy them to the code folder of the sketch for simple testings.
It includes the following files,
- libopencv_java300.dylib (patched with the @loader_path)
- libopencv_java300.so (built in Ubuntu 64 bit)
- opencv_java300.dll (default one from the pre-built binary)