本文介绍了导入org.opencv.highgui无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我安装了OpenCV(opencv-3.0.0-alpha),并且可以正常工作,但是我不能使用该导入
I installed OpenCV (opencv-3.0.0-alpha) and it works proberly but I can't use that import
import org.opencv.core.*;
import org.opencv.highgui.Highgui;
public class Main {
public static void main(String[] args) {
// System.loadLibrary("opencv_java244");
// Mat m = Highgui.imread("C:/Users/raj/Desktop/sa1.png",
// Highgui.CV_LOAD_IMAGE_COLOR);
// new LoadImage("C:/Users/raj/Desktop/dst1.jpg", m);
}
}
我收到此错误
The import org.opencv.highgui cannot be resolved
我该如何解决?
推荐答案
在opencv3.0中,java中不再有highgui模块.
该功能被拆分为新的videoio和imgcodecs(您将在其中找到未读的)模块.
in opencv3.0, there is no more highgui module in java.
the functionality was split up into new videoio and imgcodecs (that's where you will find imread) modules.
由于Java没有gui,因此-不再需要highgui模块.
since there is no gui available from java, - no need to have a highgui module anymore.
import org.opencv.core.*;
import org.opencv.imgcodecs; // imread, imwrite, etc
import org.opencv.videoio; // VideoCapture
这篇关于导入org.opencv.highgui无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!