简体   繁体   English

如何在NetBeans中打包JavaCV / OpenCV?

[英]How to pack JavaCV / OpenCV in NetBeans?

I built a colour detecting program using JavaCV/OpenCV with Java on NetBeans and it runs well on my computer. 我在NetBeans上使用JavaCV / OpenCV和Java构建了颜色检测程序,该程序在我的计算机上运行良好。 I need to pack it in some way that I can open it on other machines without them having to install OpenCV themselves before. 我需要以某种方式打包它,以便可以在其他计算机上打开它而无需他们自己先安装OpenCV。 Is it possible?! 可能吗?! If yes, how please? 如果是,请如何?

I managed to import the Jar files but don't know what to do next. 我设法导入了Jar文件,但不知道下一步该怎么做。

Thanks loads, Antoinette 感谢负载,Antoinette

This is partially possible. 这是部分可能的。 You don't have to install the full openCV to make your code run on other machines but what you need are the dll files that you are actually using. 您不必安装完整的openCV即可使代码在其他计算机上运行,​​但是您需要的是实际使用的dll文件。 In netbeans you should check what packages you are loading - eg if you use something like 在netbeans中,您应该检查要加载的软件包-例如,如果使用类似

import com.googlecode.javacv.cpp.opencv_core.*;
import com.googlecode.javacv.cpp.opencv_features2d.KeyPoint;

then you have to make sure that you have the opencv_core245.dll and the opencv_features2d245.dll (the numbers depend on the version of opencv) are on the machine running the code. 那么您必须确保在运行代码的计算机上拥有opencv_core245.dll和opencv_features2d245.dll(数字取决于opencv的版本)。 You can find these depending on the architecture of the machine either in "opencv\\build\\x86\\vc10\\bin" or "opencv\\build\\x64\\vc10\\bin". 您可以根据计算机的体系结构在“ opencv \\ build \\ x86 \\ vc10 \\ bin”或“ opencv \\ build \\ x64 \\ vc10 \\ bin”中找到这些文件。 Make sure that your path variable is pointing to the directory with these dlls. 确保您的路径变量指向具有这些dll的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM