From 10293f889180eb1d8a68f0787a3051d13c4635ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Mon, 1 Aug 2016 11:46:05 +0200 Subject: [PATCH] Call invert() in doc --- doc/source/user_guide/transforming_image_data.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/user_guide/transforming_image_data.rst b/doc/source/user_guide/transforming_image_data.rst index ac19178f..741cb229 100644 --- a/doc/source/user_guide/transforming_image_data.rst +++ b/doc/source/user_guide/transforming_image_data.rst @@ -88,10 +88,11 @@ An inverted image is also called complementary image. For binary images, True va become False and conversely. For grayscale images, pixel values are replaced by the difference of the maximum value of the data type and the actual value. For RGB images, the same operation is done for each channel. This operation can be achieved -with the negation operator ~ on any numpy array:: +with :py:func:`skimage.util.invert`:: + >>> from skimage import util >>> img = data.camera() - >>> inverted_img = ~img + >>> inverted_img = util.invert(img) Painting images with labels ~~~~~~~~~~~~~~~~~~~~~~~~~~~