Skip to content
Snippets Groups Projects
Commit 826f8fe3 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

gtESF2LSF: fixed LSF computed against semitransparent edges

parent beb1cdf1
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ function lsf_line = gtESF2LSF(img, varargin)
conf = struct( ...
'bb', [], 'direction', [], ...
'size', 21, 'oversampling', 5, 'data_type', 'single', ...
'side', 'both', 'use_astra', false, ...
'side', 'both', 'use_astra', false, 'exclude_border', 1, ...
'keep_oversampling', true, 'verbose', true);
conf = parse_pv_pairs(conf, varargin);
......@@ -72,6 +72,8 @@ function lsf_line = gtESF2LSF(img, varargin)
sum_esf = sum(rot_edge_img, 2)';
lsf = diff(sum_esf);
border = conf.exclude_border * conf.oversampling;
lsf([1:border, end-border:end]) = 0;
grad_pos = (1:numel(lsf)) + 0.5;
[max_lsf_val, max_lsf_pos] = max(lsf);
rel_max_lsf_pos = max_lsf_pos + 0.5;
......@@ -104,7 +106,7 @@ function lsf_line = gtESF2LSF(img, varargin)
lsf = reshape(lsf, conf.oversampling, conf.size);
lsf = sum(lsf, 1);
end
lsf = lsf / sum(lsf);
lsf = lsf / sum(abs(lsf));
if (conf.verbose)
f = figure();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment