how i can move an circle diagonal direction??

1 Ansicht (letzte 30 Tage)
yasmeen hadadd
yasmeen hadadd am 7 Okt. 2019
I have an image that contains a circle with a certine raduis , and i wanted to move it in a diagonal direction with 45 degree.what a new m,n should i do??
this is a code for an image:
s1=350;
s2=350;
ImageOrg1=zeros(s1,s2); %Image creation with [x by y] pixels
ImageOrg_sh=zeros(s1,s2);
rad= s1/30;
for m=1:s1
for n=1:s2
Di1=sqrt((m-s1/2)^2+(n-s2/2)^2);
if (Di1<=rad)
ImageOrg1(m,n)=1;
m_new=
n_new=
ImageOrg_sh(m_new,n_new)=1;
end
end
end
figure;imagesc(ImageOrg1); colormap gray; axis square
figure;imagesc(ImageOrg_sh); colormap gray; axis square

Antworten (0)

Kategorien

Mehr zu Get Started with 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!

Translated by