how to draw a circle in an image?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
ajeet verma
el 1 de Mzo. de 2017
Respondida: Image Analyst
el 1 de Mzo. de 2017
i want to draw a circle on an image using this equation x^2+y^2=r
1 comentario
Respuesta aceptada
Jan
el 1 de Mzo. de 2017
img = rand(100, 100, 3) * 0.2; % Test data
value = bsxfun(@plus, ((1:100) - 50) .^ 2, ((1:100).' - 50) .^ 2);
r = 30;
mask = value < (r + 1)^2 & value > (r - 1)^2;
mask3 = cat(3, mask, mask, mask);
img(mask3) = 1.0;
image(img);
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!