我目前正在开发一个android应用程序。在 java 方面,我将 a 传递List<KeyPoint> objectKeypoints
给本机代码。但是我怎样才能将本机端的这个作业转换Vector<Keypoint> objectKeypoints
为进一步处理。
示例:Java 端我的调用方法:
List<KeyPoint> objKeypoints;
Mat mGrayMat = ;// is not empty;
FeatureDetector featureDetector = FeatureDetector.create(FeatureDetector.SURF);
featureDetector.detect(obj_keypoints, mGrayMat);
FindObject(objKeypoints,mGrayMat );
本机端 C++ 代码;
JNIEXPORT void JNICALL Java_my_app_AndroidAppView_FindObject(JNIEnv* env, jobject obj, jobject obj_keypoints, jlong matAddrObjGray){
// How to convert obj_keypoints to Vector<KeyPoint>?
Vector<KeyPoint> objectKeypoints = ....;
Next Step is calculating the descriptors for the Keypoints.
}