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

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

[Octave-bug-tracker] [bug #51884] [octave forge] (image) bwmorph(blackNw


From: anonymous
Subject: [Octave-bug-tracker] [bug #51884] [octave forge] (image) bwmorph(blackNwhiteMatrix, "thicken", 1) returns negated result (+ strange behavior at border)
Date: Tue, 4 Dec 2018 03:27:31 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #15, bug #51884 (project octave):

In the literature you should look for the basic Mathematical Definition of
morphological operators; the way they are implemented in some Software (e.g.
Matlab, Octave, Gimp, ...) is best documented in the corresponding source code
-- "Use the source, Luke" ;-)

To my understanding, thickening is more or less the dual of thinning.

The Mathworks Company has some details on the algorithms they use:
  https://www.mathworks.com/help/images/ref/bwmorph.html#bui7chk-1

They have also a fine bibliography available:

  -  Haralick, Robert M., and Linda G. Shapiro, Computer and Robot Vision,
Vol. 1, Addison-Wesley, 1992.

  -  Lam, L., Seong-Whan Lee, and Ching Y. Suen, "Thinning Methodologies-A
Comprehensive Survey," IEEE Transactions on Pattern Analysis and Machine
Intelligence, Vol 14, No. 9, September 1992, page 879, bottom of first column
through top of second colum

   -  Pratt, William K., Digital Image Processing, John Wiley & Sons, Inc.,
1991.n.

Possibly also of interest:
   - http://www.di.univr.it/documenti/OccorrenzaIns/matdid/matdid699113.pdf
   -
https://homes.di.unimi.it/ferrari/ElabImm2011_12/EI2011_12_13_morphology_double.pdf
   - high performance implementation for GIMP:
https://alessandrofrancesconi.it/projects/morphop/
  

As for the thickening in the octave package:

https://octave.sourceforge.io/image/function/bwmorph.html

   Function File: bwmorph (bw, operation, n)

      For a binary image bw, performs the morphological operation, n times.

     ‘thicken’      Performs a thickening operation. This 
                    operation "thickens" objects avoiding their 
                    fusion. Its implemented as a thinning of the 
                    background. That is, thinning on negated 
                    image. Finally a diagonal fill operation 
                    is performed to avoid "eight-connecting"
                    objects.

Obviously you get the same result as you get with your MATLAB 
for the test case:

   bw = false (5,5); bw(3,3) = true;
   out=bwmorph(bw, "thicken", 1);

if you do in GNU Octave:

   bw = false (5,5); bw(3,3) = true;
   out1=bwmorph(bw,'thicken');
   out2=bwmorph(out1,'thicken');
   out=bwmorph(out1,'thicken');
   #short cut:  out=bwmorph(bw,'thicken', 3);

I guess the guys at The Mathworks Company can help you with  the investigation
of the imagetoolbox::bwmorph() implementation details (which structuring
elements gets used, what is the default value of "n", etc.)


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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