answersLogoWhite

0

OpenCV has the function cv::findHomography which can optionally use RANSAC to find the homography matrix relating two images. You can see an example of this function in action here.

Specifically the section of code you are interested in is:

FlannBasedMatcher matcher;

std::vector< DMatch > matches;

matcher.match( descriptors_object, descriptors_scene, matches );

for( int i = 0; i < good_matches.size(); i++ )

{

//-- Get the keypoints from the good matches

obj.push_back( keypoints_object[ good_matches[i].queryIdx ].pt );

scene.push_back( keypoints_scene[ good_matches[i].trainIdx ].pt );

}

Mat H = findHomography( obj, scene, CV_RANSAC );

You can then use the function cv::perspectiveTransform to warp the images according to the homography matrix.

Other options for cv::findHomography other than CV_RANSAC are 0 which uses every point and CV_LMEDS which uses the Least-Median method. More info can be found in the OpenCV camera calibration documentation here.

What else can I help you with?

Related Questions

State the rules to apply for the best results from massage?

state the rules to apply for the best results from massage


How should you apply for revaluation form class 10 results of CBSE?

How to apply for revaluation and recounting for the 10 standard cbse results


What is wrong with over generalizing the findings of a study that has a very small sample size?

The results may be easily misinterpreted, reported errorneously and would not apply generally.The results may be easily misinterpreted, reported errorneously and would not apply generally.The results may be easily misinterpreted, reported errorneously and would not apply generally.The results may be easily misinterpreted, reported errorneously and would not apply generally.


What other factors should yo take into account to get results that apply to a real basketball court?

the results of the total


How can separating salt and sand apply to the real world?

You could compare it to water distilling.


How quote applies to life?

you can apply a quote to your life by recalling memories of your life. Then compare them.


What services does Compare the Market provide?

Compare the Market provides services to compare and apply for many different insurances. They have also expanded into energy, communications and credit cards. They also have a novelty "Compare the Meerkat" site as part of their marketing campaigns.


Where can one go to compare Direct Line Breakdown rates?

You can compare Direct Line Breakdown rates online at the Direct Line website. Once on the website, you can compare rates and apply for a quote online.


Define external validity?

is the extent to which the results of study apply to people not in it


When are sy bcom results?

NO, it can not apply for mca in this college. Change for Havard


Can you choose what school to apply a scholarship?

4th standard scholarship results


Where can you compare homeowner loans?

You can compare homeowner loans by looking up loan companies in your area. You should then call and ask them if they can give you a estimate on loans that you can apply for.