From 8c53663dc1c663994e531f715a9c749391adb61b Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 11 Sep 2015 16:31:03 +0200 Subject: [PATCH 1/3] DOC : add ref to nlmeans --- skimage/restoration/_nl_means_denoising.pyx | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/skimage/restoration/_nl_means_denoising.pyx b/skimage/restoration/_nl_means_denoising.pyx index 089914fc..62ba2e96 100644 --- a/skimage/restoration/_nl_means_denoising.pyx +++ b/skimage/restoration/_nl_means_denoising.pyx @@ -359,6 +359,11 @@ cdef inline float _integral_to_distance_2d(IMGDTYPE [:, ::] integral, """ References ---------- + J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast + nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE + International Symposium on Biomedical Imaging: From Nano to Macro, + 2008, pp. 1331–1334. + Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. @@ -381,6 +386,11 @@ cdef inline float _integral_to_distance_3d(IMGDTYPE [:, :, ::] integral, """ References ---------- + J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast + nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE + International Symposium on Biomedical Imaging: From Nano to Macro, + 2008, pp. 1331–1334. + Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. @@ -523,6 +533,16 @@ def _fast_nl_means_denoising_2d(image, int s=7, int d=13, float h=0.1): ------- result : ndarray Denoised image, of same shape as input image. + + References + ---------- + J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast + nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE + International Symposium on Biomedical Imaging: From Nano to Macro, + 2008, pp. 1331–1334. + + Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means + Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. """ if s % 2 == 0: s += 1 # odd value for symmetric patch @@ -623,6 +643,16 @@ def _fast_nl_means_denoising_3d(image, int s=5, int d=7, float h=0.1): ------- result : ndarray Denoised image, of same shape as input image. + + References + ---------- + J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast + nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE + International Symposium on Biomedical Imaging: From Nano to Macro, + 2008, pp. 1331–1334. + + Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means + Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. """ if s % 2 == 0: s += 1 # odd value for symmetric patch From e822e5a556b30eaf21d7c2b0a72336409b3cf15e Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 22 Sep 2015 11:14:33 +0200 Subject: [PATCH 2/3] DOC : add ref to nlmeans in the API --- skimage/restoration/non_local_means.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/skimage/restoration/non_local_means.py b/skimage/restoration/non_local_means.py index c7bb22b9..d9e3dac4 100644 --- a/skimage/restoration/non_local_means.py +++ b/skimage/restoration/non_local_means.py @@ -69,6 +69,8 @@ def denoise_nl_means(image, patch_size=7, patch_distance=11, h=0.1, shift, that reduces the number of operations [1]_. Therefore, this algorithm executes faster than the classic algorith (``fast_mode=False``), at the expense of using twice as much memory. + This implementation has been proven to be more efficient compared to + other alternatives, see e.g. [3]_. Compared to the classic algorithm, all pixels of a patch contribute to the distance to another patch with the same weight, no matter @@ -84,9 +86,14 @@ def denoise_nl_means(image, patch_size=7, patch_distance=11, h=0.1, References ---------- .. [1] Buades, A., Coll, B., & Morel, J. M. (2005, June). A non-local - algorithm for image denoising. In CVPR 2005, Vol. 2, pp. 60-65, IEEE. + algorithm for image denoising. In CVPR 2005, Vol. 2, pp. 60-65, IEEE. - .. [2] Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means + .. [2] J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast + nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE + International Symposium on Biomedical Imaging: From Nano to Macro, + 2008, pp. 1331–1334. + + .. [3] Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. Examples From cc24efbe2bacf832d1d5bea4c84bfc20d77faa2f Mon Sep 17 00:00:00 2001 From: Charles Deledalle Date: Sun, 13 Dec 2015 18:58:01 +0100 Subject: [PATCH 3/3] DOC : change sneaky unicode in the endash --- skimage/restoration/_nl_means_denoising.pyx | 8 ++++---- skimage/restoration/non_local_means.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/skimage/restoration/_nl_means_denoising.pyx b/skimage/restoration/_nl_means_denoising.pyx index 62ba2e96..7d7ef45b 100644 --- a/skimage/restoration/_nl_means_denoising.pyx +++ b/skimage/restoration/_nl_means_denoising.pyx @@ -362,7 +362,7 @@ cdef inline float _integral_to_distance_2d(IMGDTYPE [:, ::] integral, J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, - 2008, pp. 1331–1334. + 2008, pp. 1331-1334. Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. @@ -389,7 +389,7 @@ cdef inline float _integral_to_distance_3d(IMGDTYPE [:, :, ::] integral, J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, - 2008, pp. 1331–1334. + 2008, pp. 1331-1334. Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. @@ -539,7 +539,7 @@ def _fast_nl_means_denoising_2d(image, int s=7, int d=13, float h=0.1): J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, - 2008, pp. 1331–1334. + 2008, pp. 1331-1334. Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. @@ -649,7 +649,7 @@ def _fast_nl_means_denoising_3d(image, int s=5, int d=7, float h=0.1): J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, - 2008, pp. 1331–1334. + 2008, pp. 1331-1334. Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326. diff --git a/skimage/restoration/non_local_means.py b/skimage/restoration/non_local_means.py index d9e3dac4..c2d56681 100644 --- a/skimage/restoration/non_local_means.py +++ b/skimage/restoration/non_local_means.py @@ -91,7 +91,7 @@ def denoise_nl_means(image, patch_size=7, patch_distance=11, h=0.1, .. [2] J. Darbon, A. Cunha, T.F. Chan, S. Osher, and G.J. Jensen, Fast nonlocal filtering applied to electron cryomicroscopy, in 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro, - 2008, pp. 1331–1334. + 2008, pp. 1331-1334. .. [3] Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, p. 300-326.