how to find midpoint of a bounding box using co ordinates
10 views (last 30 days)
Show older comments
I've used regionprops() to get bounding boxes,then i got matrix of co-ordinates of bounding boxes .Now i want compute centroids of bounding boxes using these co ordinates
0 Comments
Answers (1)
KSSV
on 15 Apr 2019
Read about mean
2 Comments
KSSV
on 15 Apr 2019
YOu can find the mean of coordinates: Read here: https://in.mathworks.com/help/matlab/ref/mean.html
x = rand(4,1) ; y = rand(4,1) ;
hold on
plot(x,y,'*r')
plot(mean(x),mean(y),'*b')
legend('points','mid point')
See Also
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!