Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
irp
HoloTomoToolbox
Commits
6f5e15f4
Commit
6f5e15f4
authored
Jun 15, 2020
by
Leon Merten Lohse
Browse files
Minor changes in MBA
parent
7104c33a
Pipeline
#139716
passed with stage
in 1 minute and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
functions/phaseRetrieval/directContrast/phaserec_mba.m
View file @
6f5e15f4
...
...
@@ -105,20 +105,20 @@ switch (settings.reg_type)
case
'none'
% avoid division by 0
laplaceKernel
(
0
,
0
)
=
1
;
filterKernel
=
1
.
/
laplaceKernel
;
filterKernel
=
1
.
/
(
-
laplaceKernel
)
;
% set zero frequency (singularity) to 0
filterKernel
(
0
,
0
)
=
0
;
case
'mba'
filterKernel
=
-
1
.
/
(
-
laplaceKernel
+
settings
.
reg_alpha
);
filterKernel
=
1
.
/
(
-
laplaceKernel
+
settings
.
reg_alpha
);
case
'tikhonov'
filterKernel
=
laplaceKernel
.
/
(
laplaceKernel
.^
2
+
settings
.
reg_alpha
^
2
);
filterKernel
=
-
laplaceKernel
.
/
(
laplaceKernel
.^
2
+
settings
.
reg_alpha
^
2
);
otherwise
error
([
'Invalid reg_method '
settings
.
reg_method
])
end
% apply inversion filter kernel to reconstruct the phase
phase
=
(
-
2
*
pi
*
fresnelNumber
)
*
real
(
ifft2
(
fft2
(
hologramPadded
-
1
)
.*
filterKernel
));
phase
=
(
2
*
pi
*
fresnelNumber
)
*
real
(
ifft2
(
fft2
(
hologramPadded
-
1
)
.*
filterKernel
));
% undo padding
phase
=
croparray
(
phase
,
[
settings
.
pady
,
settings
.
padx
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment