필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Elysi Cochin
Elysi Cochin 2014년 2월 10일
답변: Image Analyst 2014년 2월 10일
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