如何结合SURF和哈里斯点MATLAB [英] How to combine SURF and Harris points MATLAB

查看:634
本文介绍了如何结合SURF和哈里斯点MATLAB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们知道在Matlab,有单独检测Harris或SURF功能的功能。然后我需要结合这两个来自Harris和SURF的特性列表,使匹配更有效。

As we know at Matlab, there is function to detect Harris or SURF feature individually. Then I need to combine these two list of features from both the Harris and SURF to make the matching more efficient.

下面是我们知道的默认过程:

the following is the default procedure that we know

points_image_Harris =detectHarrisFeatures(image );
[feature_image_Harris, validpoints_image_Harris] = extractFeatures(image,  points_image_Harris ); 
indexPairs_Harris = matchFeatures(feature_template_Harris,feature_image_Harris);

但我想在匹配之前合并两个点列表:这样的:

but I want to combine two list of points before make matching: something like this:

points_image_Harris =detectHarrisFeatures(image );
points_image_SURF =detectSURFFeatures(image );
Points = points_image_Harris  + points_image_SURF 

然后使用Points列表进行特征提取, 。
如何做到这一点?如果他们有两种不同的类型?

then use the Points list to make feature extraction and them matching. How to do this? if they are have two different types? cornerPoints and SURFPoints !

我需要从SURF和Harris生成的两个特征,如下面的输出:

I need both features generated from both SURF and Harris, as the following output:

我不知道如果组合是可能的或任何想法从两个两个匹配的功能。

I don't know if the combination is possible or any idea to get both matching features from both.

实际上我想检测这些功能,然后我想得到的位置

此外,我不知道如何获取特征坐标位置从SURF&哈里斯匹配

推荐答案

使用 detectHarrisFeatures detectSURFFeatures 本质上会返回结构,其中每个字段都包含相关信息关于在图像中检测到的兴趣点。为了给出可重现的示例,让我们使用作为图像处理工具箱一部分的 cameraman.tif 图像。让我们同样使用默认参数的特征检测框架:

Using detectHarrisFeatures and detectSURFFeatures essentially returns a structure where each field contains relevant information about the interest points that are detected in the image. To give a reproducible example, let's use the cameraman.tif image that is part of the image processing toolbox. Let's also use both feature detection frameworks with the default parameters:

>> im = imread('cameraman.tif');
>> harrisPoints = detectHarrisFeatures(im);
>> surfPoints = detectSURFFeatures(im);

当我们显示 harrisPoints 我们得到:

harrisPoints = 

  184x1 cornerPoints array with properties:

    Location: [184x2 single]
      Metric: [184x1 single]
       Count: 184

当我们显示 surfPoints 时,这是我们得到的:

When we display surfPoints, this is what we get:

surfPoints = 

  180x1 SURFPoints array with properties:

              Scale: [180x1 single]
    SignOfLaplacian: [180x1 int8]
        Orientation: [180x1 single]
           Location: [180x2 single]
             Metric: [180x1 single]
              Count: 180

因此, harrisPoints surfPoints 都有一个名为位置,其中包含您想要的功能的空间坐标。这将是一个 N x 2 矩阵,其中每行给您一个特征点的位置。第一列是 x 或水平坐标,第二列是 y 或垂直坐标。原点在图片的左上角, y 坐标向下移动时为正。

As such, both harrisPoints and surfPoints have a field called Location which contains the spatial coordinates of the features you want. This would be a N x 2 matrix where each row gives you the location of a feature point. The first column is the x or horizontal coordinate and the second column is the y or vertical coordinate. The origin is at the top left corner of the image, and the y coordinate is positive when moving downwards.

因此,如果要将两个特征点组合在一起,请访问这两个对象的 Location 字段,并将它们连接到一个矩阵中:

Therefore, if you want to combine both of the feature points together, access the Location field of both objects and concatenate them together into a single matrix:

>> Points = [harrisPoints.Location; surfPoints.Location];

我想做一个小笔记,哈里斯角检测器只是一个兴趣点检测算法。所有给你的是图像中有趣点的位置。 SURF是一个检测和描述框架,其中不仅您获得兴趣点,但您还可以获得一个良好的健壮描述每个兴趣点,您可以用来执行其他兴趣点之间的匹配图片。因此,如果你想将Harris和SURF结合在一起,这是不可能的,因为Harris不支持描述兴趣点。

I'd like to make a small note that the Harris corner detector is just an interest point detection algorithm. All that is given to you are the locations of interesting points in the image. SURF is both a detection and description framework, where not only do you get interest points, but you also get a good robust description of each interest point that you can use to perform matching between other interest points in other images. Therefore, if you wanted to combine both Harris and SURF together, that isn't possible because Harris does not support describing interest points.

这篇关于如何结合SURF和哈里斯点MATLAB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆