Azzera filtri
Azzera filtri

Centroid of a estimated polygon

1 visualizzazione (ultimi 30 giorni)
Avinash Kumar
Avinash Kumar il 4 Mag 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.

Risposte (0)

Categorie

Scopri di più su Elementary Polygons in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by