how do I descrambling for the scrambling code explain in below:
조회 수: 1 (최근 30일)
이전 댓글 표시
origin=imread('lena.bmp');
imshow(origin)
title('Image Loaded')
temp=origin;
n=length(temp)
N=3000; % no of iterartions
m=0;
a=20;
b=10;
c=a*b+1;
flag=0;
while flag==0
for i=0:n-1
for j=0:n-1
x=mod(i+a*j,n);
y=mod(b*i+c*j,n);
lastimage(x+1,y+1)=temp(i+1,j+1);
end
end
m=m+1;
if(mod(m,4)==0)
figure,imshow(lastimage)
title('Scrambled Image')
flag=flag+1;
else
temp=lastimage;
end
end
댓글 수: 1
채택된 답변
Image Analyst
2018년 11월 24일
It looks like you're trying to do Arnold's cat map: Wikipedia Arnold's cat map
See wikipedia and my attached demo, which has LOTS of comments to explain it.
댓글 수: 2
Image Analyst
2018년 11월 27일
Not sure what you want to get. The previous code steps will of course "reflect" the previous code steps. In fact, they are identical. I don't know what steps to tell you to take. Do you mean
- highlight the code,
- type control-c, then
- go somewhere where you want to paste it, and
- type control-v?
Those steps?
Please format your code as code so that people can easily copy it to the clipboard. Then no one has to mess with highlighting and typing control-c, we can just click the copy link.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!