Hi Gergely,
OpenCV (v. 3.2.0) comes as a “.framework” file which I directly dragged’n’dropped into the framework group of my Xcode project. So it is placed under the “Link Binary With Libraries” section in the build phase of my app target. I’ve also added some necessary system frameworks and a prefix header to include OpenCV in all cpp files. That’s all what I’ve done in the Xcode project.
The Mat class of the android java binding looks as the following shortened version:
public class Mat {
public final long nativeObj;
// javadoc: Mat::Mat()
public Mat() {
nativeObj = n_Mat();
return;
}
// C++: Mat::Mat()
private static native long n_Mat();
}
I’ve tried to annotate them like this:
@Runtime(CRuntime.class)
public class Mat {
public final long nativeObj;
// javadoc: Mat::Mat()
public Mat() {
nativeObj = n_Mat();
return;
}
// C++: Mat::Mat()
@CFunction
private static native long n_Mat();
}
With this implementation I get the runtime exception:
FAILURE: C callback not found for method n_Mat in class org.opencv.core.Mat!
Furthermore I don’t know how to add the Nat/J C++ processor to the build procedure.
Thank you for your time. 