毕竟研究生做cv,所以这里还是测试一下java上使用opencv,参考 这里
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat; public class TestJavaOpencv {
public static void main(String[] a){
System. out .println("Welcome to OpenCV " +Core. VERSION);
System. loadLibrary(Core. NATIVE_LIBRARY_NAME);
//runtime.getTime.loadLibrary(Core.NATIVE_LIBRARY_NAME);
//eye指令模仿 matlab里面的eye,创建单位矩阵
Mat m = Mat. eye(3,3, CvType. CV_8UC1);
System. out .println("m = " +m.dump());
}
}
结果