July 2018
Intermediate to advanced
474 pages
13h 37m
English
The steps are as follows:
#function for cropping images to obtain only the significant part def crop(img): a=28*np.ones(len(img)) b=np.where((img== a).all(axis=1)) img=np.delete(img,(b),0) plt.imshow(img) img=img.transpose() d=28*np.ones(len(img[0])) e=np.where((img== d).all(axis=1)) img=np.delete(img,e,0) img=img.transpose() print(img.shape) super_threshold_indices = img < 29 img[super_threshold_indices] = 0 plt.imshow (img) return img[0:150, 0:128]
#cropping all the images ...
Read now
Unlock full access