[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52555] [octave forge] (image) Failing unit te
From: |
Rafael Laboissiere |
Subject: |
[Octave-bug-tracker] [bug #52555] [octave forge] (image) Failing unit test for bwconncomp |
Date: |
Thu, 30 Nov 2017 00:35:28 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?52555>
Summary: [octave forge] (image) Failing unit test for
bwconncomp
Project: GNU Octave
Submitted by: rlaboiss
Submitted on: Thu 30 Nov 2017 05:35:27 AM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: other
Operating System: Other
_______________________________________________________
Details:
One of the unit tests for function bwconncomp is failing randomly:
octave:1> pkg load image
octave:2> while 1
a = rand (40, 40) > 0.2;
cc = bwconncomp (a, 4);
assert (columns (cc.PixelIdxList) > 1)
endwhile
error: assert (columns (cc.PixelIdxList) > 1) failed
error: called from assert at line 92 column 11
The image matrix "a" generated with the rand function may contain a single
connected object. For instance:
octave:1> pkg load image
octave:2> n = 1000;
octave:3> c = repmat (NA, n, 1);
octave:4> for i = 1 : n
a = rand (40, 40) > 0.2;
cc = bwconncomp (a, 4);
c (i) = columns (cc.PixelIdxList);
endfor
octave:5> length (find (c <= 1))
ans = 24
Increasing the threshold, drastically reduces the failure rate, for instance:
a = rand (40, 40) > 0.3;
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52555>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52555] [octave forge] (image) Failing unit test for bwconncomp,
Rafael Laboissiere <=