本文介绍了OpenCV 3.0.0 JAR 中缺少 HighGUI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编译支持 Java 的 OpenCV 3.0.0.我的脚本是:

I was compiling OpenCV 3.0.0 with Java support. My script was:

mkdir /opt/opencv /opt/opencv/opencv-build
cd /opt/opencv
git clone https://github.com/Itseez/opencv.git
cd /opt/opencv/opencv-build
export OPENCV_INSTALL_PATH=/opt/opencv
export FFMPEG_PATH=/opt/ffmpeg/ffmpeg_build/lib
export LD_LIBRARY_PATH=$OPENCV_INSTALL_PATH/lib:$FFMPEG_PATH:/opt/opencv/opencv/3rdparty/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/opt/ffmpeg/ffmpeg_build/lib/pkgconfig
cmake28 -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX="/opt/opencv"
        -D OPENCV_EXTRA_C_FLAGS="-DHAVE_CAMV4L -DHAVE_CAMV4L2"
        -D WITH_OPENCL=OFF -D BUILD_SHARED_LIBS=OFF ../opencv
make
make install

http://docs.opencv.org/doc 中所述/tutorials/introduction/desktop_java/java_dev_intro.html 带有 -D BUILD_SHARED_LIBS=OFF.

当我想测试安装时,我发现没有 Highgui 类,也没有它的路径.这是我的 opencv-300.jar org.opencv 文件夹内容:

And when I wanted to test installation I found out that there is no Highgui class and no path for it. Here are my opencv-300.jar org.opencv folder contents:

calib3d
core
features2d
imgcodecs
imgproc
ml
objdetect
photo
utils
video
videoio

我在安装过程中是否遗漏了什么?

Have I missed something during installation?

推荐答案

Short Answer : Java 3.0 中不再有 HighGUI 模块了.

Short Answer : There is no more HighGUI module in Java for 3.0 anymore.

长一:HighGUI 中的功能已被拆分为两个附加模块:

Long One : The functionality in HighGUI has been split into two additional modules:

  1. videoio(VideoCapture、VideoWriter).
  2. imgcodecs(imread/imwrite 和朋友).

由于没有向 Java 公开 GUI 功能,因此 Java 中不再需要 HighGUI 模块.

Since there's no GUI functionality exposed to Java, there is no need to have a HighGUI module in Java anymore.

这篇关于OpenCV 3.0.0 JAR 中缺少 HighGUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 13:02