使用opencv处理

时间:2017-06-12 13:31:27

标签: opencv processing

我在打电话:

Mat opencv_K= new Mat(3, 3, CvType.CV_32F);

Processing草图中,我收到以下错误:

java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J
    at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:480)
    at java.lang.Thread.run(Thread.java:745)
UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J
A library relies on native code that's not available.
Or only works properly when the sketch is run as a 32-bit application.

这个错误在我看来与报告的here不同。

最小的例子是:

import processing.core.PVector;
import org.opencv.core.Mat;
import org.opencv.core.CvType; 
import org.opencv.core.Core;
Mat opencv_K= new Mat(3, 3, CvType.CV_32F); 

这种情况下的错误有点类似:

UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J
A library relies on native code that's not available.
Or only works properly when the sketch is run as a 32-bit application.

我在Ubuntu平台上使用Processing 3.

2 个答案:

答案 0 :(得分:1)

解决方案:

只需在相关代码

之前添加y[count]y即可

答案 1 :(得分:1)

我建议尝试使用Greg' OpenCV for Processing library

OpenCV for Processing 0.5.2 by Greg Borenstein http://gregborenstein.com
Using Java OpenCV 2.4.5.0
Mat [ 3*3*CV_32FC1, isCont=true, isSubmat=false, nativeObj=0x7fb86157f080, dataAddr=0x7fb861589e90 ]

控制台输出:

IdSortArgumentResolver