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
The problem is that approx is np.int32. So you want to do:
approx
np.int32
transform = cv2.getPerspectiveTransform(approx.astype(np.float32), h)