java包装进去的让开发一个模块,构建的contrib模块和Java包装的OpenCV

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?

解决方案

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

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)

Then you have to compile opencv as depicted in the Readme.md of the contrib repo https://github.com/itseez/opencv_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!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值