In [1]:
%pylab inline
In [5]:
%run ../common.ipynb
In [6]:
images = imread('sample.tif')
In [7]:
images.shape
Out[7]:
In [8]:
for img in images:
imshow(img)
In [9]:
img1 = images[1];
In [10]:
img1[100:110,100:110]
Out[10]:
In [11]:
imshow(img1, cmap='gray')
Out[11]:
In [12]:
img1.max()
Out[12]:
In [13]:
img1.var()
Out[13]:
In [14]:
img1.mean()
Out[14]:
In [15]:
img1[img1 < 10] = 0
In [16]:
imshow(img)
Out[16]:
In [19]:
def f(n):
temp = np.copy(img1)
temp[temp < n] = 0
imshow(temp)
In [20]:
interact(f, n=(0,255,1))
In [21]:
histshow(img1)
In [ ]: