getPerspectiveTransform Assertion error openCV
问题 I'm creating a script with opencv for detect game cards. As input image i give this one And i've wrote this for detect the cards contours import cv2 import numpy as np im = cv2.imread('/home/pero/PycharmProjects/image-recognition/python/cards.png') gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) blur = cv2.GaussianBlur(gray, (1, 1), 1000) flag, thresh = cv2.threshold(blur, 120, 255, cv2.THRESH_BINARY) contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) contours