ni.com checkout is currently experiencing issues.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

locate corners of polygon shape

Hi there,

I need to locate the middle point of the bended parts of the polygon shape.

Using the radius of x consecutive data points I can detect the straight parts of the polygon shape.
For each straight part in the shape there is one clear peak in the Radii graph.

That is all red dots on the polygone shape.

 

But for the bended parts of the shape 😞

I tried using the distance of each point toward the centre point but that doesn't work for all bended parts.

 

Question : Is there an algorithm that can detect the middle point of the bended parts of the polygon shape?

 

Thanks for any input

Best regards

Alain

0 Kudos
Message 1 of 6
(2,662 Views)

Can you post an image?

0 Kudos
Message 2 of 6
(2,645 Views)

Yes, for sure 🙂

Setting for "Radii points" between 2 and 10

Setting for Peak Width: 4, not so important

 

Thanks for having a look at it !

 

Best regards

0 Kudos
Message 3 of 6
(2,642 Views)

Alain,

 

I have not had time to try this but here is a concept:

 

At the location of each of the Max Radii points extract a segment (+/-10 points?) of adjacent data points. For each segment fit a straight line. These lines will be approximately tangent to the flattest parts of the curve. The intersections of these lines are the vertexes of a polygon with the same number of sides as your data has Max Radii. The data point nearest the vertexes should be close to the corners.

 

Lynn

Message 4 of 6
(2,620 Views)

Hi Lynn,

 

Thanks for the methodology!

I'll give it a try on sevral shapes I have and come back to here... ...

 

Best Regards

Alain

0 Kudos
Message 5 of 6
(2,602 Views)

Lynn is right. If your "polygon" has symmetrically bended corners, the lagorithm detects the closest points and so the center f the bending.

0 Kudos
Message 6 of 6
(2,582 Views)