octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41709] image-2.2.0 - bwdist giving wrong resu


From: anonymous
Subject: [Octave-bug-tracker] [bug #41709] image-2.2.0 - bwdist giving wrong results on simple array
Date: Wed, 26 Feb 2014 15:01:54 +0000
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0

URL:
  <http://savannah.gnu.org/bugs/?41709>

                 Summary: image-2.2.0 - bwdist giving wrong results on simple
array
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 26 Feb 2014 03:01:52 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: Benoit
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

The example below demonstrates that the linear index (C) is not correct (as in
[D,C] = bwdist(BW, METHOD)):


im=[1,2,3,4,NaN,6,7,8,9; 2,3,4,5,NaN,7,8,9,10;3,4,NaN,6,7,8,9,10,11;
NaN,5,6,7,8,9,10,11,12];
mask = ~isnan(im);
[dist,C] = bwdist(mask,'euclidean');  % euclidean, chessboard, cityblock,
quasi-euclidean
C


Result for C is:

% Octave 3.8.0 - Image 2.2.0
% C =
%   1   5   9  13  16  21  25  29  33
%   2   6  10  14  13  22  26  30  34
%   3   7  10  15  19  23  27  31  35
%   5   8  12  16  20  24  28  32  36
-verbatim+

Note that the value in row 1 col 4 is 5. This is incorrect, it should be
either 3 or 8! Same in row 5 cols 1 and 2.

In image-2.0.0, a more sensible value for C is produced:

% Octave 3.8.0 - Image 2.0.0
% C =
%    1    5    9   13   13   21   25   29   33
%    2    6   10   14   14   22   26   30   34
%    3    7   10   15   19   23   27   31   35
%    8    8   12   16   20   24   28   32   36
-verbatim+

Comments?

Regards,
Benoit




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41709>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]