diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 8b2ff9ff..548f37c5 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -44,7 +44,8 @@ Incorporating CellProfiler's Sobel edge detector, build and bug fixes. - Emmanuelle Guillart - Total variation noise filtering + Total variation noise filtering, integration of CellProfiler's + mathematical morphology tools. - Maƫl Primet Total variation noise filtering @@ -60,3 +61,6 @@ - Kyle Mandli CSV to ReST code for feature comparison table. + +- The Scikit Learn team + From whom we borrowed the example generation tools. diff --git a/doc/examples/plot_lena_tv_denoise.py b/doc/examples/plot_lena_tv_denoise.py index c4000d38..4797aaed 100644 --- a/doc/examples/plot_lena_tv_denoise.py +++ b/doc/examples/plot_lena_tv_denoise.py @@ -21,7 +21,7 @@ from scipy import ndimage import matplotlib.pyplot as plt from scikits.image.filter import tv_denoise -l = scipy.lena() +l = scipy.misc.lena() l = l[230:290, 220:320] noisy = l + 0.4*l.std()*np.random.random(l.shape) @@ -48,4 +48,4 @@ plt.title('(more) TV denoising', fontsize=20) plt.subplots_adjust(wspace=0.02, hspace=0.02, top=0.9, bottom=0, left=0, right=1) - +plt.show() diff --git a/doc/ext/LICENSE.txt b/doc/ext/LICENSE.txt index c23b6bfc..3ebab893 100644 --- a/doc/ext/LICENSE.txt +++ b/doc/ext/LICENSE.txt @@ -66,3 +66,46 @@ products or services of Licensee, or any third party. 8. By copying, installing or otherwise using matplotlib 0.98.3, Licensee agrees to be bound by the terms and conditions of this License Agreement. + +The file + +- gen_rst.py + +was taken from the scikit-learn (http://scikit-learn.sourceforge.net), which +has the following license: + +New BSD License + +Copyright (c) 2007 - 2011 The scikit-learn developers. +All rights reserved. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + c. Neither the name of the Scikit-learn Developers nor the names of + its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + + + + diff --git a/doc/ext/gen_rst.py b/doc/ext/gen_rst.py index cb71a605..0cf8cbd2 100644 --- a/doc/ext/gen_rst.py +++ b/doc/ext/gen_rst.py @@ -1,10 +1,12 @@ """ -Example generation for the scikit learn +Example generation for the scikit image. Generate the rst files for the examples by iterating over the python example files. -Files that generate images should start with 'plot' +Files that generate images should start with 'plot'. + +This code was taken from the scikit-learn. """ import os diff --git a/doc/source/auto_examples/images/blank_image.png b/doc/source/auto_examples/images/blank_image.png new file mode 100644 index 00000000..4913b99b Binary files /dev/null and b/doc/source/auto_examples/images/blank_image.png differ diff --git a/examples/plot_lena_tv_denoise.py b/examples/plot_lena_tv_denoise.py deleted file mode 100644 index c4000d38..00000000 --- a/examples/plot_lena_tv_denoise.py +++ /dev/null @@ -1,51 +0,0 @@ -""" -==================================================== -Denoising the picture of Lena using total variation -==================================================== - -In this example, we denoise a noisy version of the picture of Lena using the -total variation denoising filter. The result of this filter is an image that -has a minimal total variation norm, while being as close to the initial image -as possible. The total variation is the L1 norm of the gradient of the image, -and minimizing the total variation typically produces "posterized" images with -flat domains separated by sharp edges. - -It is possible to change the degree of posterization by controlling the -tradeoff between denoising and faithfulness to the original image. - -""" - -import numpy as np -import scipy -from scipy import ndimage -import matplotlib.pyplot as plt -from scikits.image.filter import tv_denoise - -l = scipy.lena() -l = l[230:290, 220:320] - -noisy = l + 0.4*l.std()*np.random.random(l.shape) - -tv_denoised = tv_denoise(noisy, weight=10) - - -plt.figure(figsize=(12,2.8)) - -plt.subplot(131) -plt.imshow(noisy, cmap=plt.cm.gray, vmin=40, vmax=220) -plt.axis('off') -plt.title('noisy', fontsize=20) -plt.subplot(132) -plt.imshow(tv_denoised, cmap=plt.cm.gray, vmin=40, vmax=220) -plt.axis('off') -plt.title('TV denoising', fontsize=20) - -tv_denoised = tv_denoise(noisy, weight=50) -plt.subplot(133) -plt.imshow(tv_denoised, cmap=plt.cm.gray, vmin=40, vmax=220) -plt.axis('off') -plt.title('(more) TV denoising', fontsize=20) - -plt.subplots_adjust(wspace=0.02, hspace=0.02, top=0.9, bottom=0, left=0, - right=1) -