-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRos_practise.asv
More file actions
44 lines (41 loc) · 791 Bytes
/
Ros_practise.asv
File metadata and controls
44 lines (41 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
clc
% myStream=RandStream('dsfmt19937');
img = rgb2gray(imread('im.jpg'));
A = im2double(img);
X0 = 0.6515;
P0 = 0.4647;
[m,n,k]=size(img);
l = min(floor(sqrt(m)),floor(sqrt(n)));
L=l*l;
X1 = lsc_py(L,X0,P0);
X = lsc_py(4*L,X0,P0);
% for i =1:1
P = scrambling(img,X);
% img = imrotate(img,90);
% img = uint8(img);
figure
imshow(P);
xlabel('scramb');
C = (ROS(P,X1,L));
% C = uint8(C);
% img = C;
% end
% T = imrotate(T,-90);
figure
imshow(C);
xlabel('only Scrambling Encrypted Image');
%
% for i = 1:4
% C = im2double(C);
T = (ROS_Decryp(C,X1,L));
% T = uint8(T);
figure
imshow(T);
xlabel('ROS uint');
% T = imrotate(T,-90);
K = decry_scramb(T,X);
% C = K;
% end
figure
imshow(K);
xlabel('only Scrambling Decrypted Image');