[Python OpenCV] Perspective Transform example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 import cv2 import numpy as np frame = cv2.imread('./input_image.png') left_top = [274,783] right_top = [650,783] left_bottom = [14,986] right_bottom = [709,988] w = int(np.linalg.norm(np.array(right_top) - np.array(left_top))) h = int(np.linalg.norm(np.array(left_bottom) - np.array(left_top))) prin..