inkscape -f FILE_IN.svg -w 256 -h 256 -e FILE_OUT.png

convert image.jpg -colorspace Gray image-bw.jpg

clear all

close all

I = imread('planets.png');

figure, imshow(I, []);

[x,y] = ginput(1);

[w,z] = ginput(1);

[u,v] = ginput(1);

fprintf('The mouse was clicked at (x,y) = (%f,%f)\n', x,y);

fprintf(', at (w,z) = (%f,%f)\n', w,z);

fprintf(', and also at (u,v) = (%f,%f)\n', u,v);

R = 25;

S = 15;

T = 5;

xc = round(x);

yc = round(y);

wc = round(w);

zc = round(z);

uc = round(u);

vc = round(v);

for x=xc-R:xc+R

        for y=yc-R:yc+R

                if (x-xc)^2 + (y-yc)^2 <= R^2

                        I(y,x) = 255; 

                end

        end

end

for w=wc-S:wc+S

        for z=zc-S:zc+S

                if (w-wc)^2 + (z-zc)^2 <= S^2

                        I(z,w) = 255;   

                end

        end

end

for u=uc-T:uc+T

        for v=vc-T:vc+T

                if (u-uc)^2 + (v-vc)^2 <= T^2

                        I(v,u) = 255;   

                end

        end

end

figure, imshow(I, []);