MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Having problems finding skeleton of a binary image using Lantuejoul's

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105629] Having problems finding skeleton of a binary image using Lantuejoul's
  • From: jalbers <jalbers at bsu.edu>
  • Date: Sat, 12 Dec 2009 06:55:56 -0500 (EST)

I am trying to find the skeletal subsets Skel(S;n) = (S (erosion) nE)
- (S (erosion) nE) (open) E) for a simple rectangle.  Skel[n] is
returning a completely black image for n=0,1,2,3,...

I think that I should be getting the classic dog bone shaped skeleton
like you see with ImageAdjust[DistanceTransform[s]].  I am new to the
concepts of morphological image processing.  Any help would be greatly
appreciated.  Thanks

Here is some of the code I am trying to use:

EE = BoxMatrix[1]; (* structuring element *)
nEE[n_] := BoxMatrix[n];
Skel1[n_] := Erosion[s, nEE[n]]
Skel2[n_] := Opening[Erosion[s, nEE[n]], EE]
Skel[n_] := ImageSubtract[Skel1[n], Skel2[n]]

(* white rectangle with a black border *)
s = Image[ArrayPad[ConstantArray[1, {90, 180}], 50]]

(* n=3 for example *)
n = 3;
Skel1[n]
Skel2[n]
Skel[n]



  • Prev by Date: Re: Notebook
  • Next by Date: Re: Notebook
  • Previous by thread: Re: Re: Animation with Sound in Mathematica?
  • Next by thread: Re: Having problems finding skeleton of a binary image