Perspective transform
import numpy as np import cv2 import matplotlib.pyplot as plt img = cv2.imread('D:/21_pycharm_project/Proj02/mark4.bmp') rows,cols,ch = img.shape # input potision pts1 = np.float32([[98,21],[187,21],[96,102],[188,102]]) # output position pts2 = np.float32([[128,21],[157,21],[96,102],[188,102]]) # get perspective transform matrix M = cv2.getPerspectiveTransform(pts1,pts2) # warp dst = cv2.warpPer..
더보기