How it works

To be able to project a point from one plane to another, first you need to compute the homography matrix. It can be performed with cv2.findHomography. This function accepts the following arguments:

  • A set of points from the source (first) plane
  • A set of points from the destination (second) plane
  • A method to find homography
  • A threshold to filter outliers
  • An output mask for outliers
  • The maximum number of iterations
  • Confidence

All arguments except the first two use the default values. The method argument describes which algorithm should be used to compute the homography. By default, all points are used, but if your data tends to contain a considerable number of outliers (points with a high portion of noise or mischosen ones), it's ...

Get OpenCV 3 Computer Vision with Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.