From 8035ce72a5f4c1b0f2337c8549a3c330e0746fd4 Mon Sep 17 00:00:00 2001 From: Leena P Date: Sat, 11 Jul 2015 18:23:02 -0400 Subject: [PATCH 1/3] Clarified that Bento Building is an alternative --- doc/source/install.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/install.txt b/doc/source/install.txt index 2c10febb..0f7e824c 100644 --- a/doc/source/install.txt +++ b/doc/source/install.txt @@ -98,7 +98,7 @@ To update:: Building with bento ``````````````````` -``scikit-image`` can also be built using `bento +Alternatively, ``scikit-image`` can also be built using `bento `__. Bento depends on `WAF `__ for compilation. From 45eecd09d271a36166cc4744eba7b758b64870c7 Mon Sep 17 00:00:00 2001 From: Leena P Date: Sat, 11 Jul 2015 18:23:28 -0400 Subject: [PATCH 2/3] Updated novice module tutorial to show images Providing visual feedback to a new user, by displaying their image, will make a much friendlier introduction to Scikit Image. --- skimage/novice/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/skimage/novice/__init__.py b/skimage/novice/__init__.py index 1b675801..d63d670d 100644 --- a/skimage/novice/__init__.py +++ b/skimage/novice/__init__.py @@ -27,6 +27,10 @@ We can create a Picture object open opening an image file: >>> from skimage import data >>> picture = novice.open(data.data_dir + '/chelsea.png') +We can display pictures (after running this command, close the window to access the prompt again): + +>>> picture.show() + Pictures know their format: >>> picture.format @@ -44,10 +48,18 @@ True >>> picture.width 451 +As a reminder, we can preview the picture with our earlier command: + +>>> picture.show() + Changing `size` resizes the picture. >>> picture.size = (45, 30) +We can preview the changes we made to the picture with our earlier command: + +>>> picture.show() + You can iterate over pixels, which have RGB values between 0 and 255, and know their location in the picture. From 80629c34bbc11c6256187ea4fa113d3110494b94 Mon Sep 17 00:00:00 2001 From: Leena P Date: Sat, 11 Jul 2015 18:23:49 -0400 Subject: [PATCH 3/3] Use a simpler operator in the novice tutorial Using a more explicit series of operations is simpler than using the compound "=/" operator, which may be unfamilar to newer users of Python. --- skimage/novice/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/novice/__init__.py b/skimage/novice/__init__.py index d63d670d..0739ca76 100644 --- a/skimage/novice/__init__.py +++ b/skimage/novice/__init__.py @@ -65,7 +65,7 @@ and know their location in the picture. >>> for pixel in picture: ... if (pixel.red > 128) and (pixel.x < picture.width): -... pixel.red /= 2 +... pixel.red = pixel.red / 2 Pictures know if they've been modified from the original file