summaryrefslogtreecommitdiff
path: root/docs/source/auto_examples/plot_otda_color_images.py
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2019-03-15 11:56:10 +0100
committerRémi Flamary <remi.flamary@gmail.com>2019-03-15 11:56:10 +0100
commit9cd97796797b9b2853c6458a7f4e9347bb212978 (patch)
treeb20fe8d819c53462234041603464b0ea33e60057 /docs/source/auto_examples/plot_otda_color_images.py
parente57f41a9f6942ef2d18fde214b90c5dee57e5c8d (diff)
update notebooks and documentation
Diffstat (limited to 'docs/source/auto_examples/plot_otda_color_images.py')
-rw-r--r--docs/source/auto_examples/plot_otda_color_images.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/source/auto_examples/plot_otda_color_images.py b/docs/source/auto_examples/plot_otda_color_images.py
index e77aec0..62383a2 100644
--- a/docs/source/auto_examples/plot_otda_color_images.py
+++ b/docs/source/auto_examples/plot_otda_color_images.py
@@ -4,7 +4,7 @@
OT for image color adaptation
=============================
-This example presents a way of transferring colors between two image
+This example presents a way of transferring colors between two images
with Optimal Transport as introduced in [6]
[6] Ferradans, S., Papadakis, N., Peyre, G., & Aujol, J. F. (2014).
@@ -27,7 +27,7 @@ r = np.random.RandomState(42)
def im2mat(I):
- """Converts and image to matrix (one pixel per line)"""
+ """Converts an image to matrix (one pixel per line)"""
return I.reshape((I.shape[0] * I.shape[1], I.shape[2]))
@@ -115,8 +115,8 @@ ot_sinkhorn.fit(Xs=Xs, Xt=Xt)
transp_Xs_emd = ot_emd.transform(Xs=X1)
transp_Xt_emd = ot_emd.inverse_transform(Xt=X2)
-transp_Xs_sinkhorn = ot_emd.transform(Xs=X1)
-transp_Xt_sinkhorn = ot_emd.inverse_transform(Xt=X2)
+transp_Xs_sinkhorn = ot_sinkhorn.transform(Xs=X1)
+transp_Xt_sinkhorn = ot_sinkhorn.inverse_transform(Xt=X2)
I1t = minmax(mat2im(transp_Xs_emd, I1.shape))
I2t = minmax(mat2im(transp_Xt_emd, I2.shape))