码迷,mamicode.com
首页 > 系统相关 > 详细

Eclipse中配置OpenCV

时间:2015-02-17 23:36:07      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:

Assume you have installed OpenCV Pack @ D:\opencv\

 

Firstly , New-->Java Project . Assume the project name is cv_helloworld

Then right click on the project "cv_helloworld" , click Properties

In the new window , select "Java Build Path" on the left , select "Libraries" on the right , then click "Add External JARs"

select D:\opencv\build\java\opencv-2410.jar , OK

then dobule-click "Native library location" , select D:\opencv\build\java\x64 , OK

 

Demo :

package cv_helloworld;

import org.opencv.core.CvType;
import org.opencv.core.Mat;

public class Main {
    public static void main(String[] args) {
        System.loadLibrary("opencv_java2410");
        Mat m  = Mat.eye(3, 3, CvType.CV_8UC1);
        System.out.println("m = " + m.dump());
    }
}

 

enjoy it~

 

 

 

Reference:

http://docs.opencv.org/2.4.4-beta/doc/tutorials/introduction/desktop_java/java_dev_intro.html

 

Eclipse中配置OpenCV

标签:

原文地址:http://www.cnblogs.com/pdev/p/4295527.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!