how to get center point of a box and draw a circle
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Elysi Cochin
am 10 Feb. 2014
Beantwortet: Image Analyst
am 10 Feb. 2014
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....
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 10 Feb. 2014
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 3-D Scene Control finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!