-
Notifications
You must be signed in to change notification settings - Fork 0
/
createHadamard.m
57 lines (55 loc) · 1.41 KB
/
createHadamard.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
53
54
55
56
57
N=128;
k=1;
l=1;
for i=1:800
% mask=Phi(i,:);
delta=zeros(1,N*N);
mask=zeros(1,N*N);
delta(i)=1;
aux=ifwht(delta);
mask=1/2*(1+aux);
mask=reshape(mask,N,N);
MASK=imresize(mask,[1024 1024],'nearest');
MASK=MASK(1:768,:);
imwrite(MASK,['/Users/francis/Desktop/Hadamard/' num2str(k), '.png'])
k=k+1;
l=l+1
imwrite(1-MASK,['/Users/francis/Desktop/Hadamard/' num2str(k), '.png'])
k=k+1;
l=l+1
end
% k=2;
% for i=174751:174751+174750-1
% % mask=Phi(i,:);
% delta=zeros(1,N*N);
% mask=zeros(1,N*N);
% delta(i)=1;
% aux=ifwht(delta);
% mask=1/2*(1+aux);
% mask=reshape(mask,N,N);
% MASK=zeros(768,1024);
% MASK=imresize(mask,[1024 1024],'nearest');
% MASK=MASK(1:768,:);
%
% imwrite(MASK,['C:\Users\admkRMC-Cosip\Desktop\Hadamard Sim\Streams\' int2str(N) '\2\' int2str(k),'.png'])
% k=k+1;
% l=l+1
% end
% k=2;
% for i=349501:349501+174750-1
% % mask=Phi(i,:);
% delta=zeros(1,N*N);
% mask=zeros(1,N*N);
% delta(i)=1;
% aux=ifwht(delta);
% mask=1/2*(1+aux);
% mask=reshape(mask,N,N);
% MASK=zeros(768,1024);
% MASK=imresize(mask,[1024 1024],'nearest');
% MASK=MASK(1:768,:);
%
% imwrite(MASK,['C:\Users\admkRMC-Cosip\Desktop\Hadamard Sim\Streams\' int2str(N) '\hilfs\' int2str(k),'.png'])
% k=k+1;
% l=l+1
% end
%