def show_file_images(filename, img_list):
fig = plt.figure()
#for 9 random images, print them
for img_num in range(0, 9):
random_num = random.randint(0, len(img_list))
img_name = img_list[random_num]
print('image name is ', img_name)
img = misc.imread(filename + img_name)
np_img = np.array(img)
flipped_img = np.fliplr(np_img)[60:160]
# print('img is ', img)
img = img[60:160]
fig.add_subplot(5, 5, img_num * 2 + 1)
plt.imshow(img)
fig.add_subplot(5, 5, img_num * 2 + 2)
plt.imshow(flipped_img)
plt.show()
评论列表
文章目录