0

所以我正在制作一个使用 FAST 检测器和 FREAK 描述符的应用程序。当涉及到匹配时,我想使用 BRUTEFORCE_HAMMING 匹配,但我没有得到预期的结果(与原始图像无关的图像提供更多匹配,然后是看起来相似的图像)

我尝试了以下代码

 MatOfDMatch matches = new MatOfDMatch();

        matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
        matcher.match(descriptors,descriptors1,matches);
        MatOfDMatch goedematches = new MatOfDMatch();

        double max_dist = 0;
        double min_dist = 100;
        //if (descriptors.cols() == descriptors1.cols())
        //{
        for( int i = 0; i < descriptors.rows(); i++ )
        { double dist = matches.toArray()[i].distance;
          if( dist < min_dist ) min_dist = dist;
          if( dist > max_dist ) max_dist = dist;
        }
        // should only draw good matches
       for( int i = 0; i < descriptors.rows(); i++ )
        {  MatOfDMatch temp = new MatOfDMatch();
           if( matches.toArray()[i].distance <= 2*min_dist )
           {   temp.fromArray(matches.toArray()[i]);
               goedematches.push_back(temp); 
               }        
       // }
        }

       Log.d("LOG!", "Number of good matches= " + goedematches.size());

但它会返回“坏”的结果。所以我的问题是,还有其他方法可以与 FREAK 描述符进行匹配吗?(我使用 OpenCV 库 2.4.4 和 Java 包装器,所以没有 C 代码)

4

3 回答 3

1

Once you have your descriptors, the brute force approach will give you the closest correspondences you can possibly find since it tries to match a descriptor on the first image against all the descriptors of the second image.

So the answer is no: with FREAK descriptors, the best results you can get (w.r.t the Hamming distance) are those you get with the brute force matching.

(This said, you should get a lot of good and bad matches when the images are similar. Have you tried to draw the matches? Try to draw lines between the matches without using the filtering step.)

于 2013-05-03T16:14:07.043 回答
0

您可能会得到不好的结果,因为 FREAK 本身不是旋转和缩放不变的。尝试在这些关键点周围使用 BRISK 关键点检测和 FREAK 描述符。

如果将描述符 mat 设置为 null,JavaCV 允许您使用 BRISK 关键点检测。

于 2013-12-05T01:01:12.223 回答
0

如果您要检查的是图像的重复性,我建议您使用BRISK汉明距离为10. 我在我的应用程序中使用了它,并且我开发了一个工具,可以帮助您找到所需的最佳算法。也许你也可以升级我设计的工具,匹配类型。

于 2013-05-08T15:09:21.313 回答