3 Dimensioal Arnold Cat Map

Hi..
I m going to use 3 D Arnold Cat Map For image Scrambling in my project.. The matrix for transformation is as follows
Here x' & y' are the locations of the pixel after mapping, x & y are the locations of the pixel before mapping, z is the intensity/color code of image before mapping, z' is the intensity/color code of image after mapping,
z'=(c*x+d*y+z) mod M. I want matlab code for this problem... I can't get proper shuffling... Pls help me.. Thank u..

3 个评论

Kalai - what have you tried so far? Please describe the problems you are having with the shuffling.
Hi Sir,
This function is used to shuffle the image
function X = three_d_catmap(Y)
p = size(Y,1); % get the number of pixels on each side
X = zeros(size(Y)); % make space for X (all zeros to start)
for i = 1:p % loop through all the pixels
for j = 1:p
newi = mod(((i-1) + (j-1)),p) + 1; % get new i coord (a+b) mod p
newj = mod(((i-1) + 2*(j-1)),p) + 1; % get new j coord (a+2b) mod p
X(newi,newj,:) = mod((4*(i-1)*1*(j-1)+Y(i,j,:)),p) + 1;
end
end
X = uint8(X); % this may have to be adjusted depending on the type of image
This script is used to shuffle the images for 65 iterations...
X = imread('lena.jpg');
for i = 1:65
X = three_d_catmap(X);
figure(1);image(X);title(i);
refresh;
pause(0.0001);
end
I cannot get proper shuffling like 2 D ACM..
If there is an error in my code,please notify it ..
Thank U Sir.
how to encrypt in Arnold Cat map with 3d image coding

请先登录,再进行评论。

回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by