Computing the homography of two images

The homography matrix is a 3 x 3 matrix that provides transformation up to scale from a given image and a new one, which must be coplanar. In src/homography.cpp, there is an extensive example that takes the first image acquired by the camera and then computes the homography for every new frame with respect to the first image. In order to run the example, take something planar, such as a book cover, and run the following command:

$ roslaunch chapter5_tutorials homography.launch

This runs the camera driver that should grab frames from your camera (webcam), detect features (SURF by default), extract descriptors for each of them, and match them with the ones extracted for the first image using a Flann-based matching with a cross-check filter. Once the program has the matches, the homography matrix H is computed. With H, we can warp the new frame to obtain the original one, as shown in the next screenshot (matches on the top, warped image using H, which is shown in plain text in the terminal):

Computing the homography of two images
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset