how to find midpoint of a bounding box using co ordinates

10 views (last 30 days)
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

Answers (1)

KSSV
KSSV on 15 Apr 2019
Read about mean
  2 Comments
KSSV
KSSV on 15 Apr 2019
IP student commented:
mean ??? can you share the link??
KSSV
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')

Sign in to comment.

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!