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

 
 

bug #51980: [octave forge] (image) Failing unit tests for edge

Submitter:  Rafael Laboissière <rlaboiss>
Submitted:  Sun 10 Sep 2017 03:06:41 PM UTC
   
 
Category:  Octave 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:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 20 Nov 2017 07:37:51 PM UTC, comment #3: 


> If tests are expected to fail, then they should be in "%!xtest" sections instead of "%!test" sections.


This depends on how one interprets "expected to fail". The ones
failing are not expected to fail, they are bugs that we are real bugs
that we are aware of.  They should still be fixed, it just happens
that we haven't got around fixing those issues either because we do
not know what Matlab is actually doing to achieve those results or
because no one has found the time to work on them.

My feeling is that marking tests for known bugs as expected to fail
helps in having them never fixed but it also seems to be causing a lot
of confusion.  It makes really hard to use the test suite to identify
regressions which reduces a lot the usefulness of tests so I will be
marking this as xtest.

Carnë Draug <carandraug>
Group Member
Sun 10 Sep 2017 08:59:16 PM UTC, comment #2: 

Thanks for the comments, Hartmut.

If tests are expected to fail, then they should be in "%!xtest" sections instead of "%!test" sections.

Rafael Laboissière <rlaboiss>
Sun 10 Sep 2017 06:04:10 PM UTC, comment #1: 

I think those two failing tests in edge.m (for the automatic threshold value in the "Canny" method) are intentional.

When I remember Carne right, they should document the remaining Matlab-incompatibility of this Octave function. See bug #46099 for details.

(Note: I think I heard Carne say that intentionally failing tests in the image package are not so uncommon...)

Hartmut <hardy>
Sun 10 Sep 2017 03:06:41 PM UTC, original submission:  


The two last unit tests for function edge in the image package are failing.  The test log is below.


***** test
 in_8 = fspecial ("gaussian", [8 8], 2);
 in_8 /= in_8(4,4);
 in_8_uint8 = im2uint8 (in_8);

 ## this is the result from Matlab's old canny method (before 2011a)
 out_8_old = logical ([
  0   0   0   0   0   0   0   0
  0   0   0   1   1   0   0   0
  0   0   1   0   0   1   0   0
  0   1   0   0   0   0   1   0
  0   1   0   0   0   0   1   0
  0   0   1   0   0   1   0   0
  0   0   0   1   1   0   0   0
  0   0   0   0   0   0   0   0]);
 out_8 = logical ([
  0   0   0   0   0   0   0   0
  0   1   1   1   1   1   0   0
  0   1   0   0   0   1   0   0
  0   1   0   0   0   1   0   0
  0   1   0   0   0   1   0   0
  0   1   1   1   1   1   0   0
  0   0   0   0   0   0   0   0
  0   0   0   0   0   0   0   0]);
 out_thresh = [0.34375 0.859375];

 [obs_edge, obs_thresh] = edge (in_8, "Canny");
 assert (obs_edge, out_8)
 assert (obs_thresh, out_thresh)

 [obs_edge_givethresh, obs_thresh_givethresh] ...
    = edge (in_8, "Canny", out_thresh);
 assert (obs_edge_givethresh, out_8)
 assert (obs_thresh_givethresh, out_thresh)

 [obs_edge_uint8, obs_thresh_uint8] = edge (in_8_uint8, "Canny");
 assert (obs_edge_uint8, out_8)
 assert (obs_thresh_uint8, out_thresh)
!!!!! test failed
ASSERT errors for:  assert (obs_thresh,out_thresh)

  Location  |  Observed  |  Expected  |  Reason
    (1)        0.27112      0.34375      Abs err 0.072632 exceeds tol 0
    (2)        0.67779      0.85938      Abs err 0.18158 exceeds tol 0
***** test
 in_9 = fspecial ("gaussian", [9 9], 2);
 in_9 /= in_9(5,5);

 ## this is the result from Matlab's old canny method (before 2011a)
 out_9_old = logical ([
  0   0   0   0   0   0   0   0   0
  0   0   0   0   0   0   0   0   0
  0   0   0   1   1   1   0   0   0
  0   0   1   0   0   0   1   0   0
  0   0   1   0   0   0   1   0   0
  0   0   1   0   0   0   1   0   0
  0   0   0   1   1   1   0   0   0
  0   0   0   0   0   0   0   0   0
  0   0   0   0   0   0   0   0   0]);
 out_9 = logical ([
  0   0   0   0   0   0   0   0   0
  0   0   1   1   1   1   0   0   0
  0   1   1   0   0   1   1   0   0
  0   1   0   0   0   0   1   0   0
  0   1   0   0   0   0   1   0   0
  0   1   1   0   0   1   1   0   0
  0   0   1   1   1   1   0   0   0
  0   0   0   0   0   0   0   0   0
  0   0   0   0   0   0   0   0   0]);
 out_thresh = [0.35 0.875];

 [obs_edge, obs_thresh] = edge (in_9, "Canny");
 assert (obs_edge, out_9)
 assert (obs_thresh, out_thresh)

 [obs_edge_givethresh, obs_thresh_givethresh] ...
    = edge (in_9, "Canny", out_thresh);
 assert (obs_edge_givethresh, out_9)
 assert (obs_thresh_givethresh, out_thresh)
!!!!! test failed
ASSERT errors for:  assert (obs_thresh,out_thresh)

  Location  |  Observed  |  Expected  |  Reason
    (1)         0.261         0.35       Abs err 0.089001 exceeds tol 0
    (2)         0.6525       0.875       Abs err 0.2225 exceeds tol 0


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 hardy (Posted a comment)
  • -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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code