我的项目是使用 OpenCV 库识别 Android 上的叶子。我使用ORB检测来获取图像的关键点并使用ORB描述符来获取关键点的特征。这是我使用的代码:
bmp=BitmapFactory.decodeResource(getResources(),R.drawable.t1);
Utils.bitmapToMat(bmp, mat);
FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
detector.detect(mat, keypoints);
DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.ORB);
extractor.compute(mat, keypoints, features);
Run Code Online (Sandbox Code Playgroud)
来源:http : //answers.opencv.org/question/6260/orb-features/
但是每次我输入相同的图像,该图像的关键点总是不同的。如果总是不同,我可以将关键点的特征保存到数据库吗?或者我应该保存图像以保存特征数据?如果可以保存到数据库,我该怎么做??