In [1]:
%pylab inline
import statsmodels as sm
import matplotlib.cm as cm
In [7]:
width, height = 100, 100
np.random.seed(42)
# Mirch
r = np.random.normal(loc=1, scale=0.001, size=(width, height))
#r = np.ones((width, height))
g = np.zeros((width, height))
#g = np.random.normal(loc=0.001, scale=0.001, size=(width, height))
#b = np.random.normal(loc=1, scale=0.01, size=(width, height))
b = np.zeros((width, height))
#b = np.random.normal(loc=0.001, scale=0.001, size=(width, height))
mirch = np.dstack((r, g, b)) # stacks 3 h x w arrays -> h x w x 3
# Haldi
b = np.zeros((width, height))
#r = np.ones((width, height))
g = np.random.normal(loc=1, scale=0.001, size=(width, height))
#g = np.random.normal(loc=0.001, scale=0.001, size=(width, height))
#b = np.random.normal(loc=1, scale=0.01, size=(width, height))
r = np.random.normal(loc=1, scale=0.001, size=(width, height))
haldi = np.dstack((r,g,b))
# Namak
b = np.random.normal(loc=1, scale=0.001, size=(width, height))
#r = np.ones((width, height))
g = np.random.normal(loc=1, scale=0.001, size=(width, height))
#g = np.random.normal(loc=0.001, scale=0.001, size=(width, height))
#b = np.random.normal(loc=1, scale=0.01, size=(width, height))
r = np.random.normal(loc=1, scale=0.001, size=(width, height))
namak = np.dstack((r,g,b))
# Kali Mirch
b = np.random.normal(loc=1, scale=0.1, size=(width, height))
#r = np.ones((width, height))
g = np.random.normal(loc=1, scale=0.1, size=(width, height))
#g = np.random.normal(loc=0.001, scale=0.001, size=(width, height))
#b = np.random.normal(loc=1, scale=0.01, size=(width, height))
r = np.random.normal(loc=1, scale=0.1, size=(width, height))
kmirch = np.dstack((r,g,b))
In [8]:
plt.imshow(mirch, cmap=cm.RdYlGn,)
Out[8]:
In [9]:
plt.imshow(haldi)
Out[9]:
In [10]:
plt.imshow(0.5*mirch+0.5*haldi)
Out[10]:
In [12]:
plt.imshow(kmirch, cmap='gray')
Out[12]:
In [14]:
plt.imshow(np.random.random((width, height)), cmap='gray')
Out[14]:
In [ ]: