Camera Calibration
Detection of planar objects
photalks
2013. 3. 18. 10:25
The goal of this tutorial is to learn how to use features2d and calib3d modules for detecting known planar objects in scenes.
Test data: use images in your data folder, for instance, box.png and box_in_scene.png.
Create a new console project. Read two input images.
Detect keypoints in both images.
Compute descriptors for each of the keypoints.
Now, find the closest matches between descriptors from the first image to the second:
Visualize the results:
Find the homography transformation between two sets of points:
Create a set of inlier matches and draw them. Use perspectiveTransform function to map points with homography:
Mat points1Projected; perspectiveTransform(Mat(points1), points1Projected, H);
Use drawMatches for drawing inliers.