how to draw a circle in an image?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
ajeet verma
am 1 Mär. 2017
Beantwortet: Image Analyst
am 1 Mär. 2017
i want to draw a circle on an image using this equation x^2+y^2=r
1 Kommentar
Akzeptierte Antwort
Jan
am 1 Mär. 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 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox 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!