From a82d814665a7aa1967164bcc6ae69a8a21045672 Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Mon, 28 Apr 2014 00:05:09 +0530 Subject: [PATCH] Changed example and hubble_deep_field doc string --- doc/examples/plot_blob.py | 21 +++++++-------------- skimage/data/__init__.py | 7 ++++--- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/doc/examples/plot_blob.py b/doc/examples/plot_blob.py index 0c433317..53ac95d4 100644 --- a/doc/examples/plot_blob.py +++ b/doc/examples/plot_blob.py @@ -6,7 +6,7 @@ Blob Detection Blobs are bright on dark or dark on bright regions in an image. In this example, blobs are detected using 3 algorithms. The image used in this case is the Hubble eXtreme Deep Field. Each bright dot in the -image is a star or a galaxy, so we are literally counting stars. +image is a star or a galaxy. Laplacian of Gaussian (LoG) ----------------------------- @@ -53,22 +53,15 @@ blobs_dog[:, 2] = blobs_dog[:, 2] * sqrt(2) blobs_doh = blob_doh(image_gray, max_sigma=30, threshold=.01) -fig1, ax1 = plt.subplots(1, 1) -ax1.set_title('Laplacian of Gaussian') - -fig2, ax2 = plt.subplots(1, 1) -ax2.set_title('Difference of Gaussian') - -fig3, ax3 = plt.subplots(1, 1) -ax3.set_title('Determinant of Hessian') - -axes = [ax1, ax2, ax3] blobs_list = [blobs_log, blobs_dog, blobs_doh] colors = ['yellow', 'lime', 'red'] +titles = ['Laplacian of Gaussian', 'Difference of Gaussian', + 'Determinant of Hessian'] +sequence = zip(blobs_list, colors, titles) -sequence = zip(axes, blobs_list, colors) - -for ax, blobs, color in sequence: +for blobs, color, title in sequence: + fig, ax = plt.subplots(1, 1) + ax.set_title(title) ax.imshow(image, interpolation='nearest') for blob in blobs: y, x, r = blob diff --git a/skimage/data/__init__.py b/skimage/data/__init__.py index d3326451..67d527a8 100644 --- a/skimage/data/__init__.py +++ b/skimage/data/__init__.py @@ -204,10 +204,10 @@ def coffee(): def hubble_deep_field(): - """Hubble eXtreme Deep Field + """Hubble eXtreme Deep Field. This photograph contains the Hubble Telescope's farthest ever view of - the universe. Originally intended to be used as an example of blob + the universe. It can be useful as an example for multi-scale detection. Notes @@ -216,7 +216,8 @@ def hubble_deep_field(): `HubbleSite `__. - The image was captured by NASA and `may be freely used in the public domain `_. + The image was captured by NASA and `may be freely used in the + public domain `_. """ return load("hubble_deep_field.jpg")