diff options
Diffstat (limited to 'docs/source/auto_examples/plot_otda_color_images.rst')
-rw-r--r-- | docs/source/auto_examples/plot_otda_color_images.rst | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/docs/source/auto_examples/plot_otda_color_images.rst b/docs/source/auto_examples/plot_otda_color_images.rst index 9c31ba7..ab0406e 100644 --- a/docs/source/auto_examples/plot_otda_color_images.rst +++ b/docs/source/auto_examples/plot_otda_color_images.rst @@ -7,7 +7,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). @@ -34,7 +34,7 @@ SIAM Journal on Imaging Sciences, 7(3), 1853-1882. 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])) @@ -168,8 +168,8 @@ Instantiate the different transport algorithms and fit them 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)) @@ -235,11 +235,13 @@ Plot new images -**Total running time of the script:** ( 3 minutes 16.469 seconds) +**Total running time of the script:** ( 3 minutes 55.541 seconds) -.. container:: sphx-glr-footer +.. only :: html + + .. container:: sphx-glr-footer .. container:: sphx-glr-download @@ -252,6 +254,9 @@ Plot new images :download:`Download Jupyter notebook: plot_otda_color_images.ipynb <plot_otda_color_images.ipynb>` -.. rst-class:: sphx-glr-signature - `Generated by Sphinx-Gallery <http://sphinx-gallery.readthedocs.io>`_ +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_ |