我不知道为什么eclipse用红线强调System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
并说:native library name can't resolved to a variable
成功导入opencv2.4.11库,以便识别此类代码Mat imgSrc = new Mat();
。
码
public class Core {
public static void main(String[] args) {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Mat imgSrc = new Mat();
imgSrc = Highgui.imread("c:/private/ArbeitsOrdner_19_Mar_2015/images/images.jpg");
System.out.println("channels: " + imgSrc.channels());
}
}