Created
November 4, 2019 10:30
-
-
Save Loovelj/edba7273009125fc8a55654f37c8afe1 to your computer and use it in GitHub Desktop.
resize 图片
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def resize_img_720p(img): | |
| h,w = img.shape[:2] | |
| new_h = max(h,w) | |
| fx = 1280/new_h | |
| resize_img = cv2.resize(img,(0, 0), fx = fx, fy = fx, interpolation = cv2.INTER_LINEAR) | |
| return resize_img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment