getPerspectiveTransform Assertion error openCV

前端 未结 1 571
無奈伤痛
無奈伤痛 2021-01-25 14:49

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



        
相关标签:
1条回答
  • 2021-01-25 15:28

    The problem is that approx is np.int32. So you want to do:

    transform = cv2.getPerspectiveTransform(approx.astype(np.float32), h)
    
    0 讨论(0)
提交回复
热议问题