Ubuntu中配置Eclipse For Using OpenCV (Java)
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
- 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
- 此代码粘贴到一个新创建的类,然后按运行1234567891011importorg.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的详细介绍:请点这里
OpenCV的下载地址:请点这里
相关推荐
learningCV 2020-11-10
learningCV 2020-08-25
huang00 2020-08-21
wangdaren 2020-08-15
BeanJoy 2020-07-28
csdmeb 2020-06-25
wangdaren 2020-06-14
pythonxuexi 2020-06-13
woniulx0 2020-06-13
greent00 2020-06-10
liangzuojiayi 2020-06-09
greent00 2020-06-09
csdmeb 2020-06-08
BeanJoy 2020-06-06
lihuifei 2020-06-05
wangdaren 2020-06-03
wangdaren 2020-05-31
greent00 2020-05-30