March 2018
Beginner to intermediate
306 pages
9h 54m
English
You need to complete the following steps:
import cv2import numpy as np
cap = cv2.VideoCapture(0)pattern_size = (10, 7)samples = []while True: ret, frame = cap.read() if not ret: break res, corners = cv2.findChessboardCorners(frame, pattern_size) img_show = np.copy(frame) cv2.drawChessboardCorners(img_show, pattern_size, corners, res) cv2.putText(img_show, 'Samples captured: %d' % len(samples), (0, 40), cv2.FONT_HERSHEY_SIMPLEX, 1.0, (0, 255, 0), 2) cv2.imshow('chessboard', img_show) wait_time = 0 if res else 30 k = cv2.waitKey(wait_time) ...Read now
Unlock full access