4

Here I have this point collection,

<Polyline Points="568,263,568,262,568,262,568,260,568,260,568,259,568,257,568,257,568,256,567,256,567,256,567,255,567,255,567,255,567,255,567,255,567,254,567,254,566,254,566,254,567,253,566,253,566,253,566,252,566,252,566,251,565,251,565,250,565,250,565,250,565,250,565,250,565,249,564,249,564,249,564,248,564,248" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,545,238,546,238,548,238,549,239,550,239,551,239,551,239,552,239,552,240,553,240,553,240,554,240,554,240,555,241,556,241,556,241,557,241,557,241,557,242,557,242,557,242,558,242,558,242,558,243,558,243,559,243,559,243,559,243,559,244,560,244,560,244,560,244,560,244,561,245,561,245,561,245,561,245,562,245,562,245,562,246,562,246" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,563,247,568,263,544,263,544,238,544,238" Stroke="Black" StrokeThickness="1" />
<Polyline Points="557,244,559,245,560,245,561,245,562,246,562,246,563,247,563,247,563,247,563,248,557,248,557,243,557,243" Stroke="Black" StrokeThickness="1" />
<Polyline Points="520,263,520,262,520,262,520,260,520,260,520,259,520,257,520,257,520,256,521,256,521,256,521,255,521,255,521,255,521,255,521,255,521,254,521,254,522,254,522,254,521,253,522,253,522,253,522,252,522,252,522,251,523,251,523,250,523,250,523,250,523,250,523,250,523,249,524,249,524,249,524,248,524,248" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,543,238,542,238,540,238,539,239,538,239,537,239,537,239,536,239,536,240,535,240,535,240,534,240,534,240,533,241,532,241,532,241,531,241,531,241,531,242,531,242,531,242,530,242,530,242,530,243,530,243,529,243,529,243,529,243,529,244,528,244,528,244,528,244,528,244,527,245,527,245,527,245,527,245,526,245,526,245,526,246,526,246" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,525,247,520,263,544,263,544,238,544,238" Stroke="Black" StrokeThickness="1"  />

This Point collection form the below shape,

enter image description here

I need the outer points without the inside shapes. I need output image like this enter image description here

I also tried finding outer points using algorithm.

ref link : Graham scan But i'm not getting the exact result any one guide me . Thanks in Advance.

ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86

1 Answers1

0

This one I got answer.

I merge all the points and using convex hull algorithm , I will get the outer points.

convex hull algorithm reference Project