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

 
 

bug #51719: [octave forge] (image) watershed unit test failure

Submitted by:  Rafael Laboissiere <rlaboiss>
Submitted on:  Thu 10 Aug 2017 07:12:54 AM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  other Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 18 Aug 2021 02:48:37 PM UTC, comment #1: 

Per Carnë's comment in watershed.cc

// Implements watershed in a quite naïve way.  From the wikipedia, named
// "Meyer's flooding algorithm" (but I could not find the actual paper
// that reports it).

The paper can be found on Isabelle Bloch's website:

https://perso.telecom-paristech.fr/bloch/P6Image/Projets/Watersnakes/meyer1994.pdf

Also there is a .m-file implementation
https://github.com/Stick-To/watershed/blob/master/mywatershed.m
Which follows from Digital Image Processing_3ed_Gonzalez

However, this code also fails for these two tests.

ASSERT errors for:  assert (watershed (im),labeled8)

  Location  |  Observed  |  Expected  |  Reason
   (3,4)          3            0         Abs err 3 exceeds tol 0 by 3
   (4,4)          0            4         Abs err 4 exceeds tol 0 by 4

ASSERT errors for:  assert (watershed (im_full),matlab_result_full)

  Location  |  Observed  |  Expected  |  Reason
   (3,4)          2            0         Abs err 2 exceeds tol 0 by 2
   (3,5)          0            4         Abs err 4 exceeds tol 0 by 4

Which is the same as the errors in image v2.12.0

Anonymous
Thu 10 Aug 2017 07:12:54 AM UTC, original submission:  

Using Octave 4.2.1 and package image 2.6.1, the following unit test in watershed:

## The following test is required for Matlab compatibility.  There must be
## something specific about their implementation that causes it to return
## this value.  Even when solving it on paper, we get different results.
%!test
%! im = [
%!     2     3    30     2
%!     3    30     3    30
%!   255    31    30     4
%!     2   255    31    30
%!     1     2   255     5];
%!
%! labeled8 = [
%!     1     1     0     3
%!     1     1     0     3
%!     0     0     0     0
%!     2     2     0     4
%!     2     2     0     4];
%! assert (watershed (im), labeled8);

fails with the following message:

error: ASSERT errors for:  assert (watershed (im, 8),labeled8)

  Location  |  Observed  |  Expected  |  Reason
   (3,4)          3            0         Abs err 3 exceeds tol 0
   (4,4)          0            4         Abs err 4 exceeds tol 0
octave:74> assert (watershed (im), labeled8)
error: ASSERT errors for:  assert (watershed (im),labeled8)

  Location  |  Observed  |  Expected  |  Reason
   (3,4)          3            0         Abs err 3 exceeds tol 0
   (4,4)          0            4         Abs err 4 exceeds tol 0

Rafael Laboissiere <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 jwe (Updated the item)
  • -email is unavailable- added by rlaboiss (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-12 jwe Summaryimage: watershed unit test failure => [octave forge] (image) watershed unit test failure

    Back to the top


    Powered by Savane 3.7