How to create a circle with a gradient inside
Ältere Kommentare anzeigen
Hi
I can create a white circle on a black background but how do I create a white circle with a gradient like in the image below? Here is the code I have so far:
if true
% code
width = 200;
I = zeros(width);
radius = 80;
centre = width/2;
final_image = insertShape(I,'FilledCircle',[centre,centre,radius],'Color', 'white', 'Opacity', 1.0);
imshow(final_image);

end
Steve
Akzeptierte Antwort
Weitere Antworten (1)
Tamir Suliman
am 3 Dez. 2016
0 Stimmen
...'Color', [1 4 1]..
instead of using color white find the the rgb equivalent and use the option above with insertShape
where [1 4 1] is your RGB color matrix
1 Kommentar
Steven Bruce
am 3 Dez. 2016
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
