bugGNU Octave - Bugs: bug #52555, [octave forge] (image) Failing...

 
 

bug #52555: [octave forge] (image) Failing unit test for bwconncomp

Submitter:  Rafael Laboissière <rlaboiss>
Submitted:  Thu 30 Nov 2017 05:35:27 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Other
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 30 Nov 2017 11:21:59 AM UTC, comment #1: 

Thank you for the bug report.  I have actually fixed this issue just last week http://hg.code.sf.net/p/octave/image/rev/f76f53f02f42

This is still unreleased but will be part of the next minor release (version 2.8.0)

Carnë Draug <carandraug>
Group Member
Thu 30 Nov 2017 05:35:27 AM UTC, original submission:  

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;


Rafael Laboissière <rlaboiss>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rlaboiss (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-30 carandraug StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code