Skip to Content
Mastering OpenCV 4 with Python
book

Mastering OpenCV 4 with Python

by Alberto Fernández Villán
March 2019
Intermediate to advanced
532 pages
13h 2m
English
Packt Publishing
Content preview from Mastering OpenCV 4 with Python

Camera pose estimation and more advanced augmentation

The aruco_detect_markers_draw_square.py script can be easily modified in order to overlay a more advanced augmentation.

In this case, we are going to overlay the image of a tree, which can be seen in the next screenshot:

To perform this augmentation, we have coded the draw_augmented_overlay() function, as shown in the following:

def draw_augmented_overlay(pts_1, overlay_image, image):    """Overlay the image 'overlay_image' onto the image 'image'"""    # Define the squares of the overlay_image image to be drawn:    pts_2 = np.float32([[0, 0], [overlay_image.shape[1], 0], [overlay_image.shape[1
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

OpenCV 4 with Python Blueprints - Second Edition

OpenCV 4 with Python Blueprints - Second Edition

Dr. Menua Gevorgyan, Michael Beyeler (USD), Arsen Mamikonyan, Michael Beyeler
Learning OpenCV 3

Learning OpenCV 3

Adrian Kaehler, Gary Bradski
Machine Learning for OpenCV 4 - Second Edition

Machine Learning for OpenCV 4 - Second Edition

Aditya Sharma, Michael Beyeler (USD), Vishwesh Ravi Shrimali, Michael Beyeler

Publisher Resources

ISBN: 9781789344912Supplemental Content