Message Boards Message Boards

Algorithm underlying MorphologicalGraph

Posted 10 years ago

Hi all,

As we are writing up a publication for which we used the built-in function MorphologicalGraph, I was wondering whether someone could tell if this function is based on a known, named algorithm so that I can also refer to the exact algorithm that lies at the basis of our findings.



POSTED BY: Jan Baetens
2 Replies

Hi Jan,

the MorphologicalGraph algorithm was developed and implemented by me four years ago. I am not aware of any preexisting or established algorithms to refer to, nor a publication with respect to this matter.

You can find an unambiguous description of the MorphologicalGraph-result on the reference page under "Detailed and Options".

The processing steps are fairly straight forward:

  1. apply Binarize[Thinning[img, Method -> "Morphological", Padding -> 0]] upfront to obtain a skeleton,
  2. find the vertices given by branch and end-points (use MorphologicalTransform[skeleton, "SkeletonEndPoints", Padding -> 0] and MorphologicalTransform[skeleton, "SkeletonBranchPoints", Padding -> 0]),
  3. remove vertices and find link-components,
  4. identify which vertices are connected by which links,
  5. remove links that loop back to the same vertex,
  6. remove redundant links,
  7. assemble everything in an undirected Graph object.

For details, see the top-level code via: Unprotect[MorphologicalGraph] ClearAttributes[MorphologicalGraph, ReadProtected] ?? MorphologicalGraph ?? ImageMorphologicalOperationsDumpiMorphologicalGraph ?? ImageMorphologicalOperationsDumpoMorphologicalGraph

Hope that helps!

Please cite Mathematica in your article: Wolfram Research, Inc., Mathematica, Version 8.0, Champaign, IL (2010).

Kind Regards, Markus

POSTED BY: Markus van

Probably better to cite the version of Mathematica actually used. That said, I certainly agree it is good to cite the software whenever that aspect of the contribution is significant (as would be the case here).

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract