Java utility library for OpenCV Java API

OpenCV library written in C++ is one of the most popular libraries for Computer Vision. It has a Java binding, making it possible to call from Java applications. This project aims to provide utility static methods and classes to make it more convenient to work with OpenCV from Java.

Some example utility functionalities (in the form of static methods and classes) are:

  • Show/visualize Mat image object on Java Swing window.
  • Convert i,j,k 3D position in a matrix to linear index stored in row major format.
  • A method similar to Matlab’s im2single.
  • A method similar to Matlab’s im2double.
  • Convert Mat matrix object to integer array.
  • Convert Mat matrix object to byte array.
  • Convert Mat matrix object to float array.
  • Convert Mat matrix object to double array.
  • Convert byte array to Mat matrix object of given number of rows, columns and channels.
  • Convert float array to Mat matrix object of given number of rows, columns and channels.
  • Convert double array to Mat matrix object of given number of rows, columns and channels.
  • Convert integer array to Mat matrix object of given number of rows, columns and channels.
  • Convert Mat matrix object of type unsigned char (which could be an image) to integer 3D array.
  • Convert Mat matrix object of type unsigned char (which could be an image) to byte 3D array.
  • Convert Mat matrix object of float type to float 3D array.
  • Convert Mat matrix object of double type to float 3D array.
  • Convert Mat matrix object of integer type to integer 3D array.
  • Pretty print a given Mat matrix object to console.

Part of the code is available at: https://github.com/Kyaw-Kyaw-Htike/Java-utility-library-for-OpenCV-Java-API

  • Programming languages: Java, C++, C
  • Special Expertise Required: OpenCV library, Computer Vision
  • Contribution: Entire project