Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Effective Robotics Programming with ROS

You're reading from   Effective Robotics Programming with ROS Find out everything you need to know to build powerful robots with the most up-to-date ROS

Arrow left icon
Product type Paperback
Published in Dec 2016
Publisher Packt
ISBN-13 9781786463654
Length 468 pages
Edition 3rd Edition
Tools
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Luis S√°nchez Luis S√°nchez
Author Profile Icon Luis S√°nchez
Luis S√°nchez
Enrique Fernandez Perdomo Enrique Fernandez Perdomo
Author Profile Icon Enrique Fernandez Perdomo
Enrique Fernandez Perdomo
Anil Mahtani Anil Mahtani
Author Profile Icon Anil Mahtani
Anil Mahtani
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started with ROS FREE CHAPTER 2. ROS Architecture and Concepts 3. Visualization and Debugging Tools 4. 3D Modeling and Simulation 5. The Navigation Stack – Robot Setups 6. The Navigation Stack – Beyond Setups 7. Manipulation with MoveIt! 8. Using Sensors and Actuators with ROS 9. Computer Vision 10. Point Clouds Index

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 in 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 from the first image using 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 following screenshot (matches on the top, warped image using H, which...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime