Skip to content

Commit 1ea47b7

Browse files
committed
read image using pylab
1 parent 2dc6dd8 commit 1ea47b7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

examples/plot_otda_color_images.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
# License: MIT License
1919

2020
import numpy as np
21-
from scipy import ndimage
2221
import matplotlib.pylab as pl
2322
import ot
2423

@@ -45,8 +44,8 @@ def minmax(I):
4544
# -------------
4645

4746
# Loading images
48-
I1 = ndimage.imread('../data/ocean_day.jpg').astype(np.float64) / 256
49-
I2 = ndimage.imread('../data/ocean_sunset.jpg').astype(np.float64) / 256
47+
I1 = pl.imread('../data/ocean_day.jpg').astype(np.float64) / 256
48+
I2 = pl.imread('../data/ocean_sunset.jpg').astype(np.float64) / 256
5049

5150
X1 = im2mat(I1)
5251
X2 = im2mat(I2)

examples/plot_otda_mapping_colors_images.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
# License: MIT License
2323

2424
import numpy as np
25-
from scipy import ndimage
2625
import matplotlib.pylab as pl
2726
import ot
2827

@@ -48,8 +47,8 @@ def minmax(I):
4847
# -------------
4948

5049
# Loading images
51-
I1 = ndimage.imread('../data/ocean_day.jpg').astype(np.float64) / 256
52-
I2 = ndimage.imread('../data/ocean_sunset.jpg').astype(np.float64) / 256
50+
I1 = pl.imread('../data/ocean_day.jpg').astype(np.float64) / 256
51+
I2 = pl.imread('../data/ocean_sunset.jpg').astype(np.float64) / 256
5352

5453

5554
X1 = im2mat(I1)

0 commit comments

Comments
 (0)