Effacer les filtres
Effacer les filtres

Centroid of a estimated polygon

1 vue (au cours des 30 derniers jours)
Avinash Kumar
Avinash Kumar le 4 Mai 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.

Réponses (0)

Catégories

En savoir plus sur Elementary Polygons dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by