Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Elysi Cochin
Elysi Cochin el 10 de Feb. de 2014
Respondida: Image Analyst el 10 de Feb. de 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....

Respuesta aceptada

Image Analyst
Image Analyst el 10 de Feb. de 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

Más respuestas (0)

Categorías

Más información sobre 3-D Scene Control en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by