Filter löschen
Filter löschen

How can I get image value and change value?

1 Ansicht (letzte 30 Tage)
PJM
PJM am 10 Jun. 2013
Hi.
I have an image file. I want to draw a filled inside black circle. Must use this command : img(sub2ind(size(img),y,x))=0;
I cannot filled circle. I can make black circle only. How can I filled the circle?
Please help me. Thank you.

Antworten (1)

David Sanchez
David Sanchez am 10 Jun. 2013
hold on your image,
to draw a circle centered at (2,3):
t=0:.1:2*pi;
r=1;
x_c = 2;
y_c = 3;
x = x_c - r*cos(t);
y = y_c - r*sin(t);
fill(x,y,'k')
  1 Kommentar
PJM
PJM am 10 Jun. 2013
Thank you for your answer, but I already know about that. I want to draw a filled circle using 'change image value' method.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by