标签:image rgs lips 配置文件 sys dap proc 入门 port
文章为博主原创,纯属个人理解,如有错误欢迎指出。
如需转载,请注明出处。
到此环境配置完成!!!
build path 修改版本后,即可。
1 package com.lw.test; 2 import org.opencv.core.Core; 3 import org.opencv.core.CvType; 4 import org.opencv.core.Mat; 5 6 public class OpenCVTest { 7 public static void main(String[] args) { 8 System.out.println("Welcome to OpenCV " + Core.VERSION); 9 System.loadLibrary(Core.NATIVE_LIBRARY_NAME); 10 Mat m = Mat.eye(3, 3, CvType.CV_8UC1); 11 System.out.println("m = " + m.dump()); 12 } 13 }
1 package com.lw.test; 2 3 import org.opencv.core.Core; 4 import org.opencv.core.Mat; 5 import org.opencv.imgproc.Imgproc; 6 import org.opencv.imgcodecs.Imgcodecs; 7 8 public class OpenCVTest { 9 public static void main(String[] args) { 10 System.loadLibrary(Core.NATIVE_LIBRARY_NAME); 11 Mat img = Imgcodecs.imread("G:\\opencv01.png"); 12 Imgproc.cvtColor(img, img, Imgproc.COLOR_RGB2GRAY); 13 Imgproc.adaptiveThreshold(img, img, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY_INV, 25, 10); 14 Imgcodecs.imwrite("G:\\opencv01_new.png", img); 15 } 16 }
欢迎opencv的坑,哈哈哈
【opencv】Java+eclipse+opencv 环境搭建 helloword入门demo
标签:image rgs lips 配置文件 sys dap proc 入门 port
原文地址:http://www.cnblogs.com/oldwei/p/7742245.html