Draw a circle inside a black image
Afficher commentaires plus anciens
I want to draw a circle in this 500x500 black matrix, but it deos not appear idk
here is the code
E = zeros(500,500);
E2 = insertShape(E, 'Circle',[250 250 100], ...
'Color','white', 'LineWidth',5);
figure(5),imshow(uint8(E2));
Réponse acceptée
Plus de réponses (1)
Try this:
E = zeros(500,500, 'uint8'); % Make image as uint8 right from the beginning.
E2 = insertShape(E, 'Circle', [250 250 100], ...
'Color','white', 'LineWidth',5);
imshow(E2, []); % Display it with [] to expand the contrast.
1 commentaire
Maha Almuaikel
le 6 Mar 2022
Catégories
En savoir plus sur Read, Write, and Modify Image dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


