【发布时间】:2012-05-17 11:16:48
【问题描述】:
我目前正在开发一个安卓应用程序。在 java 方面,我将 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.
}
【问题讨论】:
标签: android opencv java-native-interface feature-detection