![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1235997/image.png)
Kindly Explain the shuffled procedure and how this code shuffle the pixel values?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Wajid
le 19 Déc 2022
Réponse apportée : Image Analyst
le 19 Déc 2022
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1235617/image.png)
A=[1 2 3 4 ; 5 6 7 8; 9 10 11 12; 13 14 15 16];
disp('Given Matrix is');
disp(double(A));
%/////////////////////////////////////////////////
[m,n]=size(A);
a = 3;
b = 3;
num_iter = 5;
for k=1:num_iter
for i=1:m
for j=1:n
r = mod([round((1-(a*(i^2))+j)),round((b*i))],[m n]);
S(i,j)=A(r(1)+1,r(2)+1);
end
end
A=S;
end
disp('Shuffled matrixx is');
disp(double(S));
%//////////////////////////////////////////
%%Reshuflle Imge
[m,n]=size(S_img);
a = 3;
b = 3;
num_iter = 5;
for k=1:num_iter
for i=1:m
for j=1:n
r1 = mod([round((1-(a*(i^2))+j)),round((b*i))],[m n]);
x1(r1(1)+1,r1(2)+1)=S_img(i,j);
%x(i,j)=x1(r(1)+1,r(2)+1);
end
end
S_img=x1;
end
disp('shuffled matrix is ');
disp(double(x1));
0 commentaires
Réponse acceptée
Image Analyst
le 19 Déc 2022
I'm pretty sure that's the algorithm for Arnolds Cat Map:
Attached is my demo.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1235997/image.png)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Point Cloud Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!