-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoding_cat8KD.m
More file actions
38 lines (31 loc) · 1.2 KB
/
coding_cat8KD.m
File metadata and controls
38 lines (31 loc) · 1.2 KB
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
%% SETUP
% DEBUG ( 0 -> off, 1 -> on)
DEBUG = 0;
addpath('./debug/');
add_directory_path;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hologram_path = './dataset/Interfere2/cat8KD/';
hologram_name = 'Hol_cat_8KD';
addpath(hologram_path);
% Loading here is different from previous dataset because the .mat file is
% organized in a different manner
load('CGH_cat8KD.mat'); % Hol_3D_cat.mat
% Preliminary phase
Hol = getfield(CGH,'Hol');
% splitting complex matrix in real part and imaginary part
[real_matrix, imag_matrix] = split_complex(Hol); % Hol is the complex matrix name in the .mat file
% Range mapping & quantization
range_mapping_and_quant;
% Hologram info
wlen = 6.33e-07; % wavelength
zrec = 0.014193735937222; % reconstruction distance
height = 8192; % hologram height (px)
width = 8192; % hologram width (px)
pitch = 1.0e-06; % pixel pitch
area = (height*width*pitch); % area (?)
% Clear directories
del_coding_files;
%% SNR calc + Complex regeneration and rendering + PSNR calc
% Since it takes a lot of time it is advisable to open the script
% and execute one piece at a time as set in the script
SNR_PSNR_calc_CRR;