OpenCv image read from file system in Java
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
public class Giris {
public static void main(String[] args) {
//Load native library
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
//image container object
Mat imageArray;
//Read image from file system
imageArray=Imgcodecs.imread("C:\\Users\\mesutpiskin\\sample.jpg");
//Get image with & height
System.out.println(imageArray.rows());
System.out.println(imageArray.cols());
}
}