构建的contrib模块和Java包装的OpenCV [英] Build OpenCV with contrib modules and Java wrapper

查看:1528
本文介绍了构建的contrib模块和Java包装的OpenCV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试建立我的Windows 7机器上的OpenCV。要包含的contrib模块添加我的CMake中的图形用户界面的OPENCV_EXTRA_MODULES_PATH。 OpenCV的-300.jar和OpenCV-300.dll创建,但我不能找到Java类使用额外的模块。我缺少的进行配置的选项?是否有可能在所有从Java使用额外的模块?

I try to build OpenCV on my Windows 7 machine. To include the contrib modules I add the OPENCV_EXTRA_MODULES_PATH in CMake-gui. The opencv-300.jar and opencv-300.dll are created but I can not find the Java classes to use the extra modules. Am I missing an option in the make configuration? Is it possible at all to use the extra modules from Java?

推荐答案

我同样的问题,我用这种方式解决。我想象你已经从contrib请回购下载的特定版本匹配OpenCV的版本,如果你想建立。所以去目录,然后输入,例如,面部模块目录;在这个目录下有一个名为的CMakeLists.txt,你必须编辑文件。这个文件应该是这样的:

i've the same problem and i resolved in this way. I imagine that you had downloaded from contrib repo the specific version match with the opencv version if you want to build. So go in directory and enter, for example, face module directory; in this directory there is a file called CMakeLists.txt that you have to edit. This file should be like this:

set(the_description "Face recognition etc")
ocv_define_module(face opencv_core opencv_imgproc opencv_objdetect WRAP python)
# NOTE: objdetect module is needed for one of the samples

如果你想拥有的org.opencv.face包在你的OpenCV-3xx.jar库必须修改这样的文件的第2行:

If you want to have the org.opencv.face package in your opencv-3xx.jar library you have to modify the 2nd line of the file in this way:

ocv_define_module(face opencv_core opencv_imgproc opencv_objdetect WRAP python java)

然后,你必须为在contrib回购 https://github.com描绘编译的OpenCV / itseez / opencv_contrib

显然,如果你想添加到您的OpenCV-3xx.jar库同样的事情适用于所有的contrib模块。

Obviously the same thing is valid for all the contrib modules if you want to add to your opencv-3xx.jar library.

我希望这个解决方案适用于您,再见!

I hope that this solution works for you, bye!

这篇关于构建的contrib模块和Java包装的OpenCV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆