Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pylab as plt
- import numpy as np
- Z = np.vstack([np.zeros((1, 256)), np.zeros((1, 256,)), np.zeros((1, 256,))])
- im = plt.imshow(Z, interpolation='none', aspect='auto')
- plt.colorbar(im, orientation='horizontal')
- plt.show()
- import pylab as plt
- import numpy as np
- Z = np.vstack([np.zeros((1, 256)), np.zeros((1, 256,)), np.zeros((1, 256,))]).transpose()
- Z = Z[None, ...]
- im = plt.imshow(Z, interpolation='none', aspect='auto')
- plt.colorbar(im, orientation='horizontal')
- plt.show()
- img = np.zeros((800, 500, 3), dtype=np.float32)
- %pylab inline
- import cv2
- z = zeros([400, 400]) # 400X400 zero matrix
- r, g, b = z, z, z
- img = cv2.merge([r, g, b])
- imshow(img)
Add Comment
Please, Sign In to add comment