Skip to content

Instantly share code, notes, and snippets.

@shakes76
Created January 25, 2015 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shakes76/150d2722b291c1ccb409 to your computer and use it in GitHub Desktop.
Save shakes76/150d2722b291c1ccb409 to your computer and use it in GitHub Desktop.
Test script for the imageio PGM read member
# -*- coding: utf-8 -*-
"""
Test Read PGM member
Created on Sun Jan 25 21:52:38 2015
@author: shakes
"""
import imageio
image, depth = imageio.readPGM("lena.pgm")
frtSpace, depth = imageio.readPGM("frtSpace.pgm")
#Plot
import matplotlib.pyplot as plt
#plot images
fig, ax = plt.subplots(nrows=1, ncols=2, figsize=(16, 5))
plt.gray()
ax[0].imshow(image)
ax[0].axis('off')
ax[0].set_title('Image')
ax[1].imshow(frtSpace)
ax[1].axis('off')
ax[1].set_title('FRT of Lena')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment