-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdemo.m
38 lines (29 loc) · 1.17 KB
/
demo.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
%% Demo for the MicroPSF, a fast and accurate approximation of the Gibson-Lanni model
% If the parameters are not assigned, default setting will be loaded, see
% MicroscPSF for details.
%
% Reference:
% [1] Gibson, S.F. & Lanni, F., 1992.
% Experimental test of an analytical model of aberration in an
% oil-immersion objective lens used in three-dimensional light
% microscopy. J. Opt. Soc. Am. A, 9(1), pp.154-166.
% [2] Li, J., Xue, F. and Blu, T. Fast and accurate 3D PSF
% computation for fluorescence microscopy. J. Opt. Soc. Am. A,
% 34(6), pp. 1029-1034, 2017.
%
% Copyright © Jizhou Li, Feng Xue and Thierry Blu, 2017
% Update date: 4 May, 2017
addpath('Utilities/');
clear; clc;
params.size = [256 256 128];
% params.fastcom = 1; % even faster, may need recompile
params.numBasis = 100;
params.numSamp = 1000;
tic;
PSF = MicroscPSF(params);
t = toc;
% Accuracy evaluation, PSNR and RSE with the ground truth
load(['Data/GT_' strrep(num2str(params.size), ' ', '_')]);
PSNR = aux_PSNR(PSF,GT);
RSE = aux_RSE(PSF,GT);
disp(['PSNR: ' num2str(PSNR) 'dB, RSE: ' num2str(RSE) ', running time = ' num2str(t) 's']);