匹配的SIFT关键点的坐标 [英] co-ordinate of the matched SIFT keypoints

查看:620
本文介绍了匹配的SIFT关键点的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做的OpenCV带,在那里我匹配的SIFT关键点两个图像,并得到了来自使用K近邻搜索相同的良好匹配的项目。其中,k = 2。

I am doing a project with openCV, where I matched two images with the SIFT keypoints and got good match from the same using K nearest neighbor search. where k=2.

现在我想要得到它具有在IMAGE2良好匹配,也为在IMAGE2相应的关键点的坐标值的关键点SIFT的坐标值。任何机构可以帮助我。谢谢。

Now I want to get the co-ordinate value of the SIFT keypoints which has good match in the image2 and also the co-ordinate value for the corresponding keypoints in Image2. Can any body help me with this. thanks.

我找出解决方案......这是很容易的......我傻......我只是转换的关键点为CvPoints和我可以轻松地获得坐标值....

I find out the solution...It was very easy...silly me...I just converted the keypoints into CvPoints and from that I can easily get the co-ordinate values....

推荐答案

所有..我已经解决了这个问题...在我弗里斯特转换的良好匹配的关键点到Cvpoints,然后得到了来自Cvpoints的坐标..在code为相同的如下 -

All.. I have solved the problem...at frist i converted the good matched keypoints into Cvpoints and then got the co-ordinate from the Cvpoints..the code for the same is as below-

 for( i =0; i <good_matches.size(); i++ )
  {
    // the keypoints from the good matches only
    points1.push_back( keypoints1[ good_matches[i].queryIdx ].pt );
    points2.push_back( keypoints2[ good_matches[i].trainIdx ].pt );

    printf("xco-ordinate of good mathched keypoints in image1   %d\n\n",points1[i].x);
    printf("y co-ordinate for image 1    %d \n\n",points1[i].y);
    printf("x co-ordinate for image2    %d \n\n",points2[i].x);
    printf("y co-ordinate for image2    %d\n\n",points2[i].y);

  }  

这篇关于匹配的SIFT关键点的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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