[Pkg-octave-commit] [octave-image] 01/01: d/p/im2bw-unit-test.patch ; New patch

Rafael Laboissiere rafael at debian.org
Sun Sep 10 12:34:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

rafael pushed a commit to branch master
in repository octave-image.

commit 1769a96dd93d82a03b297e68c2ef13bf2abd02ba
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Sun Sep 10 09:23:42 2017 -0300

    d/p/im2bw-unit-test.patch ; New patch
---
 debian/patches/im2bw-unit-test.patch | 23 +++++++++++++++++++++++
 debian/patches/series                |  1 +
 2 files changed, 24 insertions(+)

diff --git a/debian/patches/im2bw-unit-test.patch b/debian/patches/im2bw-unit-test.patch
new file mode 100644
index 0000000..4745151
--- /dev/null
+++ b/debian/patches/im2bw-unit-test.patch
@@ -0,0 +1,23 @@
+Description: Ensure that argument of graythresh is a valid image
+Author: Rafael Laboissiere <rafael at debian.org>
+Forwarded: https://savannah.gnu.org/bugs/index.php?51976
+Last-Update: 2017-09-10
+
+--- octave-image-2.6.1.orig/inst/im2bw.m
++++ octave-image-2.6.1/inst/im2bw.m
+@@ -162,11 +162,15 @@ endfunction
+ 
+ %!test
+ %! im = [((randn(10)/10)+.3) ((randn(10)/10)+.7)];
++%! im (im < 0.0) = 0.0;
++%! im (im > 1.0) = 1.0;
+ %! assert (im2bw (im, "Otsu"), im2bw (im, graythresh (im(:), "Otsu")))
+ %! assert (im2bw (im, "moments"), im2bw (im, graythresh (im(:), "moments")))
+ 
+ %!test
+ %! im = [((randn(10)/10)+.3) ((randn(10)/10)+.7)];
++%! im (im < 0.0) = 0.0;
++%! im (im > 1.0) = 1.0;
+ %! im = reshape (im, [10 10 1 2]);
+ %! assert (im2bw (im, "Otsu"), im2bw (im, graythresh (im(:), "Otsu")))
+ %! assert (im2bw (im, "moments"), im2bw (im, graythresh (im(:), "moments")))
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..970c756
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+im2bw-unit-test.patch

-- 
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-image.git



More information about the Pkg-octave-commit mailing list