Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- img_orig = plt.imread('Untitled 25.png')
- # r, g, b, a = np.moveaxis(imgorig, 2, 0)
- three = np.moveaxis(img_orig, 2, 0)[:3]
- three_flat = [x.flatten() for x in three]
- names = ('r', 'g', 'b')
- if True:
- plt.figure()
- for i, (img, name) in enumerate(zip(three, names)):
- plt.subplot(2, 3, i+1+0)
- plt.imshow(img, vmin=0, vmax=1, cmap='gray')
- plt.title(name, fontsize=16)
- for i in range(3):
- plt.subplot(2, 3, i+1+3)
- plt.plot(three_flat[(i+0)%3], three_flat[(i+1)%3], '.k')
- plt.title(names[(i+1)%3] + ' vs ' + names[(i+0)%3], fontsize=16)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement