Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width = 480
- original_width = image.shape[1]
- if original_width != width:
- ratio_resize = int(width / original_width)
- height = (image.shape[0] * ratio_resize) #get the height respecting the ratio
- dim = (width, height) #new dimensions
- resized = cv2.resize(image, dim)
- print("resized dimenson:", resized.shape)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement