【Java 其餘】Java opencv配置及測試

畢竟研究生作cv,因此這裏仍是測試一下java上使用opencv,參考 這裏html

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());
       }
}

結果java

相關文章
相關標籤/搜索