how to get center point of a box and draw a circle

1 次查看(过去 30 天)
is there any way to get the center point of the boxes and draw a circle with "point a" as center and "point b" as radius.... and cut the circled portion and save it as another image
for i=i2:(i2+i4)
for j=i1:(i1+i3)
pointb(i,j)=255;
end
end
for i = i6 : (i6+i8)
for j = i5 : (i5+i7)
pointa(i,j) = 255;
end
end
This is the code used to get the 2 white boxes. but how to draw a circle with "point a" as center and "point b" as radius.... please do reply....

采纳的回答

Image Analyst
Image Analyst 2014-2-10
You should be able to get the center of the boxes if you drew them - just take the average of the left and right sides and the top and bottom rows.
Then you can draw a circle using any of the 4 ways in the FAQ http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 3-D Scene Control 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by