Borrar filtros
Borrar filtros

Centroid of a estimated polygon

1 visualización (últimos 30 días)
Avinash Kumar
Avinash Kumar el 4 de Mayo de 2015
I have created a polygon using estimate geometry. I need to find the center/centroid of the polygon. I am using the below code to create the polygon.
if true
codematchedBoxPoints = boxPoints(boxPairs(:, 1), :);
matchedScenePoints = scenePoints(boxPairs(:, 2), :);
[tform, inlierBoxPoints, inlierScenePoints] = estimateGeometricTransform(matchedBoxPoints, matchedScenePoints, 'affine');
boxPolygon = [1, 1;size(boxImage, 2), 1;size(boxImage, 2), size(boxImage, 1);1, size(boxImage, 1);1, 1];
newBoxPolygon = transformPointsForward(tform, boxPolygon);
end
I need the centroid of the newBoxPolygon. Please help me how to do it.

Respuestas (0)

Categorías

Más información sobre Elementary Polygons en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by