March 2018
Beginner to intermediate
306 pages
9h 54m
English
The steps for this recipe are as follows:
import cv2import numpy as npimport matplotlib.pyplot as plt
circle_image = np.zeros((500, 500), np.uint8)cv2.circle(circle_image, (250, 250), 100, 255, -1)
rect_image = np.zeros((500, 500), np.uint8)cv2.rectangle(rect_image, (100, 100), (400, 250), 255, -1)
circle_and_rect_image = circle_image & rect_image
circle_or_rect_image = circle_image | rect_image
plt.figure(figsize=(10,10))plt.subplot(221)plt.axis('off') ...