Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import numpy as np
- >>> import cv2
- >>> a = np.arange(5*5).reshape(5,-1)
- >>> a
- array([[ 0, 1, 2, 3, 4],
- [ 5, 6, 7, 8, 9],
- [10, 11, 12, 13, 14],
- [15, 16, 17, 18, 19],
- [20, 21, 22, 23, 24]])
- >>> cv2.resize(a, (0, 0), fx=0.5, fy=0.5, interpolation=cv2.INTER_NEAREST)
- array([[ 0, 2],
- [10, 12]])
- >>> a = np.arange(4*6).reshape(4,-1)
- >>> a
- array([[ 0, 1, 2, 3, 4, 5],
- [ 6, 7, 8, 9, 10, 11],
- [12, 13, 14, 15, 16, 17],
- [18, 19, 20, 21, 22, 23]])
- >>> cv2.resize(a, (0, 0), fx=0.5, fy=0.5, interpolation=cv2.INTER_NEAREST)
- array([[ 0, 2, 4],
- [12, 14, 16]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement