Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- src = np.float32(
- [[280, 700], # Bottom left
- [595, 460], # Top left
- [725, 460], # Top right
- [1125, 700]]) # Bottom right
- dst = np.float32(
- [[250, 720], # Bottom left
- [250, 0], # Top left
- [1065, 0], # Top right
- [1065, 720]]) # Bottom right
- offset =50
- def perspective(img):
- img_size = (img.shape[1], img.shape[0])
- M = cv2.getPerspectiveTransform(src, dst)
- warped = cv2.warpPerspective(img, M, img_size)
- return warped
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement