Detecting a planar target in images
In the previous recipe, we explained how homographies can be used to stitch together images separated by a pure rotation to create a panorama. In this recipe, we also learned that different images of a plane also generate homographies between views. We will now see how we can make use of this fact to recognize a planar object in an image.
How to do it...
Suppose you want to detect the occurrence of a planar object in an image. This object could be a poster, painting, logo, signage, and so on. Based on what we have learned in this chapter, the strategy would consist of detecting feature points on this planar object and to try to match them with the feature points in the image. These matches would then be validated using a robust matching scheme similar to the one we used previously, but this time based on a homography. If the number of valid matches is high, then this must mean that our planar object is visible in the current image.
In this recipe, our mission...