forked from scikit-image/scikit-image
/
plot_specific.py
46 lines (35 loc) · 878 Bytes
/
plot_specific.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""
===============
Specific images
===============
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from skimage import data
matplotlib.rcParams['font.size'] = 18
######################################################################
#
# Stereo images
# =============
fig, axes = plt.subplots(1, 2, figsize=(8, 4))
ax = axes.ravel()
images = data.stereo_motorcycle()
ax[0].imshow(images[0])
ax[1].imshow(images[1])
fig.tight_layout()
plt.show()
######################################################################
#
# Faces and non-faces dataset
# ===========================
#
# A sample of 20 over 200 images is displayed.
fig, axes = plt.subplots(4, 5, figsize=(20, 20))
ax = axes.ravel()
images = data.lfw_subset()
for i in range(20):
ax[i].imshow(images[90+i], cmap=plt.cm.gray)
ax[i].axis('off')
fig.tight_layout()
plt.show()