- from skimage import io, viewer
- img = io.imread('test.jpg', as_grey=True) # load the image as grayscale
- print 'image matrix size: ', img.shape # print the size of image
- print '\n First 5 columns and rows of the image matrix: \n', img[:5,:5]*255
- viewer.ImageViewer(img).show() # plot the image
No comments:
Post a Comment