感谢支持
我们一直在努力

Ubuntu中配置Eclipse For Using OpenCV (Java)

Ubuntu中配置Eclipse For Using OpenCV (Java)

添加OpenCV

  • Window -> Preferences -> Java -> Build Path -> User Libraries ->Press Newjava_lib
  • 设置LIBNAME并单击确定java_name
  • 添加外部JAR;通过浏览 ~/OpenCV/ …. /build/bin andopencv-246.jar; 按确定add_jar
  • 选择本机库的位置,然后按编辑;外部文件夹;  通过浏览 ~/OpenCV/ …. /build/lib and press Ok; press Ok, press Oknative
  • restart Eclipse

OpenCV的教程测试建立项目

  • File -> New -> Java project -> press Finishproject_java
  • Project -> Properties -> Add Library -> User Library (press Next) – > chose OpenCV 2.6.4 -> press finishadd_lib2
  • File -> New -> Class -> press Finishadd_class
  • 代码粘贴到一个新创建的类,然后按运行

    OpenCv test

     
     
     
     
     
     
    Java

     
     

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11

    importorg.opencv.core.Core;
    importorg.opencv.core.CvType;
    importorg.opencv.core.Mat;
     
    publicclassHello{
        publicstaticvoidmain(String[]args){
            System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
            Matm  =Mat.eye(3,3,CvType.CV_8UC1);
            System.out.println(“m = “+m.dump());
        }
    }


    run_code

OpenCV官方教程中文版(For Python) PDF  http://www.linuxidc.com/Linux/2015-08/121400.htm

Ubuntu Linux下安装OpenCV2.4.1所需包 http://www.linuxidc.com/Linux/2012-08/68184.htm

Ubuntu 12.04 安装 OpenCV2.4.2 http://www.linuxidc.com/Linux/2012-09/70158.htm

CentOS下OpenCV无法读取视频文件 http://www.linuxidc.com/Linux/2011-07/39295.htm

Ubuntu 12.04下安装OpenCV 2.4.5总结 http://www.linuxidc.com/Linux/2013-06/86704.htm

Ubuntu 10.04中安装OpenCv2.1九步曲 http://www.linuxidc.com/Linux/2010-09/28678.htm

基于QT和OpenCV的人脸识别系统 http://www.linuxidc.com/Linux/2011-11/47806.htm

[翻译]Ubuntu 14.04, 13.10 下安装 OpenCV 2.4.9  http://www.linuxidc.com/Linux/2014-12/110045.htm

OpenCV的详细介绍���请点这里
OpenCV的下载地址:请点这里

本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-05/131604.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Ubuntu中配置Eclipse For Using OpenCV (Java)
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏