OpenCV perspective transform in python

前端 未结 3 1865
灰色年华
灰色年华 2021-01-14 10:47

I\'m trying to rectify an image in python. I have a Homography H (from a rotation matrix that rotates around the x, y and z axis) that looks like this for example: [

3条回答
  •  盖世英雄少女心
    2021-01-14 11:19

    It says the image should be np.float32 or np.float64.

    So convert the image first by img_cv2 = np.float32(img_cv2).

    Then apply the cv2.perspectiveTransform() and cv2.warpPerspective()

    Check this tutorial for demo

提交回复
热议问题