3 Dimensioal Arnold Cat Map

20 views (last 30 days)
Kalai S
Kalai S on 19 Dec 2014
Commented: Rajasekar SRC MCA on 13 Jan 2018
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 Comments
Kalai S
Kalai S on 22 Dec 2014
Edited: Walter Roberson on 5 Oct 2015
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.
Rajasekar SRC MCA
Rajasekar SRC MCA on 13 Jan 2018
how to encrypt in Arnold Cat map with 3d image coding

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!