JavaCV-OpenCV MacOSX 10.7.4 x64

时间:2012-05-24 03:33:33

标签: opencv javacv

我已尽力解决此错误,我能够在Windows x86中运行但我无法在MacOSX x64中编译任何内容。

我已经使用Xcode和port -v opencv + python27选项安装了OpenCV,所有的路径都是正确的。我发现不同的一件事就是在代码中

public static final String genericIncludepath    = "/opt/local/include/";
public static final String genericLinkpath       = "/opt/local/lib/:/opt/local/lib64/:/usr/local/lib/:/usr/local/lib64/";

MacOSX的genericLinkpath不包含lib64。

哪些步骤会重现问题? 1.尝试运行HoughLines或任何样本

预期产量是多少?你怎么看?

线程“main”中的异常java.lang.UnsatisfiedLinkError:/private/var/folders/qr/j3rwh4h15fncfqgff8__qvcw0000gn/T/libjniopencv_core2612287037709553365.dylib:未加载库:lib / libopencv_core.2.4.dylib引用自:/ private / var /folders/qr/j3rwh4h15fncfqgff8__qvcw0000gn/T/libjniopencv_core2612287037709553365.dylib原因:找不到图片     at java.lang.ClassLoader $ NativeLibrary.load(Native Method)     在java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)     在java.lang.Runtime.load0(Runtime.java:770)     在java.lang.System.load(System.java:1020)     在com.googlecode.javacpp.Loader.loadLibrary(Loader.java:403)     在com.googlecode.javacpp.Loader.load(Loader.java:342)     在com.googlecode.javacpp.Loader.load(Loader.java:316)     在com.googlecode.javacv.cpp.opencv_core。(opencv_core.java:131)     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Class.java:247)     在com.googlecode.javacpp.Loader.load(Loader.java:335)     在com.googlecode.javacv.cpp.opencv_imgproc。(opencv_imgproc.java:96)     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Class.java:247)     在com.googlecode.javacpp.Loader.load(Loader.java:335)     在com.googlecode.javacv.cpp.opencv_highgui。(opencv_highgui.java:91)     在com.javacv.HoughLines.main(HoughLines.java:32)

您使用的是哪个版本的产品?什么操作系统? MacOS X 10.7.4

$ java -version java版“1.6.0_31” Java(TM)SE运行时环境(版本1.6.0_31-b04-415-11M3646) Java HotSpot(TM)64位服务器VM(版本20.6-b01-415,混合模式)

JAVACV - javacv-bin-20120512

回显$ PATH /选择/本地/包括中:/ opt / local / bin目录中:/ opt / local / sbin中:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录:在/ usr / local / bin目录:在/ usr / X11 / bin中

$ ls | grep opencv opencv_createsamples opencv_haartraining opencv_performance opencv_traincascade

$ ls | grep opencv libopencv_calib3d.2.4.0.dylib libopencv_calib3d.2.4.dylib libopencv_calib3d.dylib libopencv_contrib.2.4.0.dylib libopencv_contrib.2.4.dylib libopencv_contrib.dylib libopencv_core.2.4.0.dylib libopencv_core.2.4.dylib libopencv_core.dylib libopencv_features2d.2.4.0.dylib libopencv_features2d.2.4.dylib libopencv_features2d.dylib libopencv_flann.2.4.0.dylib libopencv_flann.2.4.dylib libopencv_flann.dylib libopencv_gpu.2.4.0.dylib libopencv_gpu.2.4.dylib libopencv_gpu.dylib libopencv_highgui.2.4.0.dylib libopencv_highgui.2.4.dylib libopencv_highgui.dylib libopencv_imgproc.2.4.0.dylib libopencv_imgproc.2.4.dylib libopencv_imgproc.dylib libopencv_legacy.2.4.0.dylib libopencv_legacy.2.4.dylib libopencv_legacy.dylib libopencv_ml.2.4.0.dylib libopencv_ml.2.4.dylib libopencv_ml.dylib libopencv_nonfree.2.4.0.dylib libopencv_nonfree.2.4.dylib libopencv_nonfree.dylib libopencv_objdetect.2.4.0.dylib libopencv_objdetect.2.4.dylib libopencv_objdetect.dylib libopencv_photo.2.4.0.dylib libopencv_photo.2.4.dylib libopencv_photo.dylib libopencv_stitching.2.4.0.dylib libopencv_stitching.2.4.dylib libopencv_stitching.dylib libopencv_ts.2.4.0.dylib libopencv_ts.2.4.dylib libopencv_ts.dylib libopencv_video.2.4.0.dylib libopencv_video.2.4.dylib libopencv_video.dylib libopencv_videostab.2.4.0.dylib libopencv_videostab.2.4.dylib libopencv_videostab.dylib

    System.out.println(System.getProperty("os.arch"));  x86_64
System.out.println(System.getProperty("sun.arch.data.model")); 64

0 个答案:

没有答案