在Android OpenCV 2.4.4中选择好匹配的好方法是什么

时间:2013-04-29 22:39:10

标签: android opencv image-processing

我正在写一个识别钞票的程序。以下是我找到比赛的功能。我有5张手机记忆图像和1张通过相机拍摄的图像。此代码正在for循环中执行,以查找具有最多匹配项的图像。从变量匹配中获得好匹配的好方法是什么?

object_desc = new Mat();
scene_desc = new Mat();

object_keys = new MatOfKeyPoint();
scene_keys = new MatOfKeyPoint();

matches = new MatOfDMatch();
good_matches = new MatOfDMatch();

Utils.bitmapToMat(image, object); 
surf = FeatureDetector.create(FeatureDetector.FAST);
surf.detect(object, object_keys);
surf.detect(mRgba, scene_keys);

surfEX = DescriptorExtractor.create(DescriptorExtractor.FREAK);
surfEX.compute(object, object_keys, object_desc);
surfEX.compute(mRgba, scene_keys, scene_desc);
dm = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);

dm.match(object_desc, scene_desc, matches);

0 个答案:

没有答案