[Top][All Lists]

[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:

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.,

Possibly also of interest:
   - http://www.di.univr.it/documenti/OccorrenzaIns/matdid/matdid699113.pdf
   - high performance implementation for GIMP:

As for the thickening in the octave package:


   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"

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;
   #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:


  Message sent via Savannah

reply via email to

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