Understanding early outlier detection and rejection

We can extend the idea of outlier rejection to every step in the computation. The goal then becomes minimizing the workload while maximizing the likelihood that the result we obtain is a good one.

The resulting procedure for early outlier detection and rejection is embedded in the FeatureMatching.match method. This method first converts the image to grayscale and stores its shape:

def match(self, frame):    # create a working copy (grayscale) of the frame    # and store its shape for convenience    img_query = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)    sh_query = img_query.shape # rows,cols 

Then, if the outlier is detected during any step of the computation, we raise an Outlier exception to terminate ...

Get OpenCV 4 with Python Blueprints - Second Edition 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.