Ubuntu中配置Eclipse For Using OpenCV (Java)
添加OpenCV库
- Window -> Preferences -> Java -> Build Path -> User Libraries ->Press New
- 设置LIBNAME并单击确定
- 添加外部JAR;通过浏览 ~/OpenCV/ …. /build/bin andopencv-246.jar; 按确定
- 选择本机库的位置,然后按编辑;按外部文件夹; 通过浏览 ~/OpenCV/ …. /build/lib and press Ok; press Ok, press Ok
- restart Eclipse
从OpenCV的教程测试建立项目
- File -> New -> Java project -> press Finish
- Project -> Properties -> Add Library -> User Library (press Next) – > chose OpenCV 2.6.4 -> press finish
- File -> New -> Class -> press Finish
- 此代码粘贴到一个新创建的类,然后按运行
OpenCv test
Java
1
2
3
4
5
6
7
8
9
10
11importorg.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());
}
}
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