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

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

[Octave-bug-tracker] [bug #55172] [octave forge] (image) b = bwmorph (BW


From: Hartmut
Subject: [Octave-bug-tracker] [bug #55172] [octave forge] (image) b = bwmorph (BW, 'thin', 1) is not Matlab compatible
Date: Sat, 15 Dec 2018 10:09:38 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

Follow-up Comment #8, bug #55172 (project octave):

Thanks for implementing this new (and compatible!) "thin" algorithm. In
principle I think this is a good patch now, there are just some minor things
to polish up:
* As you said in comment #7 it would be good to use the old "thin-pratt"
algorithm in the "thicken" procedure of bwmorph, for the time beeing. (We can
then later look at "thicken" to maybe also make it compatible.) But currently
your mentioned change (i.e. using thin-pratt inside of thicken) is NOT part of
the patch, yet. Could you add it, please?
* There seem to be no other uses of "thin" in the image package, so no other
side effects should be expected.
* Your 2 tests in the patch file pass and are Matlab compatible. I have
checked this.
* I have some other tests (they also pass and are also Matlab compatible). You
could add them to your patch:


H3 = [0 0 0 0 0 0;
      0 1 1 1 0 0;
      0 1 1 1 0 0;
      0 0 0 1 0 1;
      0 0 0 0 1 1;
      0 0 0 1 1 1];
out3 = bwmorph (H3, "thin", 1);
expected3 = logical(
    [0   0   0   0   0   0;
     0   0   0   0   0   0;
     0   1   1   0   0   0;
     0   0   0   1   0   1;
     0   0   0   0   1   0;
     0   0   0   1   1   0]);
assert (out3, expected3);     
   
out33 = bwmorph (H3, "thin", 2);
expected33 = logical(
    [0   0   0   0   0   0;
     0   0   0   0   0   0;
     0   1   1   0   0   0;
     0   0   0   1   0   1;
     0   0   0   0   1   0;
     0   0   0   1   0   0]);
assert (out33, expected33);

out333 = bwmorph (H3, "thin", inf);
assert  (out333, expected33);


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55172>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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