how to generate bounding box coordinates from centroid location
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
polyin=[235.798080444336 161.207092285156
248.257690429688 206.053085327148
340.019195556641 180.559265136719
327.559875488281 135.713150024414]
[x,y] = centroid(polyin);
i want the bounding box coordinates from output [x y].
please help
0 Kommentare
Antworten (1)
Matt J
am 3 Feb. 2021
Bearbeitet: Matt J
am 3 Feb. 2021
The centroid alone does not carry enough information to determine the bounding box, but you can instead do
polyin=[235.798080444336 161.207092285156
248.257690429688 206.053085327148
340.019195556641 180.559265136719
327.559875488281 135.713150024414];
[xlim,ylim] = boundingbox( polyshape(polyin) )
0 Kommentare
Siehe auch
Kategorien
Mehr zu Elementary Polygons finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!