-
Notifications
You must be signed in to change notification settings - Fork 0
/
recovery_M.m
52 lines (51 loc) · 1.17 KB
/
recovery_M.m
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
45
46
47
48
49
50
51
52
close all;
clear;
clc;
%»Ö¸´Í¼Ïñ
t3=imread('t3-2.bmp');
t4=imread('t4-2.bmp');
t5=imread('t5.bmp');
t6=imread('t6.bmp');
t8=imread('t8.bmp');
t9=imread('t9.bmp');
s=imread('secret-M.bmp');
signal=imread('signal.bmp');
[m,n]=size(s);
r1=bitxor(t3,bitxor(t4,bitxor(t5,t6)));
r2=bitxor(t5,bitxor(t6,bitxor(t8,t9)));
for i=1:m
for j=1:n
if(signal(i,j)==0||signal(i,j)==255||signal(i,j)==173)
r1(i,j)=s(i,j);
r2(i,j)=s(i,j);
end
end
end
figure;imshow(r1);
figure;imshow(r2);
imwrite(r1,'r1.bmp');
imwrite(r2,'r2.bmp');
% %»Ö¸´Í¼Ïñ
% t1=imread('t1-1.bmp');
% t2=imread('t2-1.bmp');
% t3=imread('t3.bmp');
% t4=imread('t4.bmp');
% t5=imread('t7.bmp');
% t6=imread('t8.bmp');
% s=imread('secret-M.bmp');
% signal=imread('signal.bmp');
% [m,n]=size(s);
% r1=bitxor(t1,bitxor(t2,bitxor(t3,t4)));
% r2=bitxor(t1,bitxor(t2,bitxor(t5,t6)));
% for i=1:m
% for j=1:n
% if(signal(i,j)==0||signal(i,j)==255||signal(i,j)==173)
% r1(i,j)=s(i,j);
% r2(i,j)=s(i,j);
% end
% end
% end
% figure;imshow(r1);
% figure;imshow(r2);
% imwrite(r1,'r1.bmp');
% imwrite(r2,'r2.bmp');