Guest User

Untitled

a guest
Dec 13th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import pylab as plt
  2. import numpy as np
  3.  
  4. Z = np.vstack([np.zeros((1, 256)), np.zeros((1, 256,)), np.zeros((1, 256,))])
  5. im = plt.imshow(Z, interpolation='none', aspect='auto')
  6. plt.colorbar(im, orientation='horizontal')
  7. plt.show()
  8.  
  9. import pylab as plt
  10. import numpy as np
  11.  
  12. Z = np.vstack([np.zeros((1, 256)), np.zeros((1, 256,)), np.zeros((1, 256,))]).transpose()
  13. Z = Z[None, ...]
  14. im = plt.imshow(Z, interpolation='none', aspect='auto')
  15. plt.colorbar(im, orientation='horizontal')
  16. plt.show()
  17.  
  18. img = np.zeros((800, 500, 3), dtype=np.float32)
  19.  
  20. %pylab inline
  21. import cv2
  22. z = zeros([400, 400]) # 400X400 zero matrix
  23. r, g, b = z, z, z
  24. img = cv2.merge([r, g, b])
  25. imshow(img)
Add Comment
Please, Sign In to add comment