Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to pass a ArrayList<matofpoint> for a jni C ++ function?

I am doing a project in Java with Android jni c ++. I have a function in C ++ with the following parameters:

C ++ function:

void rectify (vector <Point2f> & corners, Mat & img) {...}

In JAVA call would be:

Mat image = Highgui.imread("img.png");
List <MatOfPoint> cornners =  new ArrayList<MatOfPoint>();;
Point b = new Point (real_x2, real_y2);
MatOfPoint ma = new MatOfPoint (b);
cornners.add(ma);
rectfy(image.getNativeObjAddr(), cornners)

public native "??" rectfy(long mat, "??" matofpoint);

With that, I wonder how will the function c ++ jni:

JNIEXPORT ?? JNICALL Java_ImageProcessingActivity_rectfy (JNIEnv * jobject, ?? cornners, inputMatAddress jlong)

Thanks!!

How to pass a ArrayList<matofpoint> for a jni C ++ function?

I am doing a project in Java with Android jni c C ++. I have a function in C ++ with the following parameters:

C ++ function:

void rectify (vector <Point2f> & corners, Mat & img) {...}

In JAVA , call would be:

Mat image = Highgui.imread("img.png");
List <MatOfPoint> cornners =  new ArrayList<MatOfPoint>();;
Point b = new Point (real_x2, real_y2);
MatOfPoint ma = new MatOfPoint (b);
cornners.add(ma);
rectfy(image.getNativeObjAddr(), cornners)

public native "??" rectfy(long mat, "??" matofpoint);

With that, I wonder how will the function c C ++ jni:

JNIEXPORT ?? JNICALL Java_ImageProcessingActivity_rectfy (JNIEnv * jobject, ?? cornners, inputMatAddress jlong)

Thanks!!

How to pass a ArrayList<matofpoint> for a jni C ++ function?

I am doing a project in Java with Android jni C ++. I have a function in C ++ with the following parameters:

C ++ function:

void rectify (vector <Point2f> & corners, Mat & img) {...}

In JAVA, call would be:

Mat image = Highgui.imread("img.png");
List <MatOfPoint> cornners =  new ArrayList<MatOfPoint>();;
Point b = new Point (real_x2, real_y2);
MatOfPoint ma = new MatOfPoint (b);
cornners.add(ma);
rectfy(image.getNativeObjAddr(), cornners)

public native "??" rectfy(long mat, "??" matofpoint);

With that, I wonder how will the function C ++ jni:

JNIEXPORT ?? JNICALL Java_ImageProcessingActivity_rectfy (JNIEnv * jobject, ?? cornners, inputMatAddress jlong)