Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
leverjs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
leverjs
Commits
175eb28a
Commit
175eb28a
authored
Oct 15, 2020
by
ac_22
Browse files
Options
Downloads
Patches
Plain Diff
cell boundary efficiency - use adaptthresh
parent
6c487ba7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/+Ensemble/setCellBoundaryEfficiency.m
+11
-4
11 additions, 4 deletions
matlab/+Ensemble/setCellBoundaryEfficiency.m
with
11 additions
and
4 deletions
matlab/+Ensemble/setCellBoundaryEfficiency.m
+
11
−
4
View file @
175eb28a
...
...
@@ -25,7 +25,12 @@ if sensitivity>1
T
=
lm
(
end
);
else
T
=
adaptthresh
(
im
,
sensitivity
,
'NeighborhoodSize'
,
4
*
floor
(
size
(
im
)/
16
)
+
1
,
'statistic'
,
'gaussian'
);
T
=
imdilate
(
T
,
se
);
% T=imdilate(T,se);
end
bw
=
logical
(
0
*
im
);
for
i
=
1
:
length
(
Cells
)
idx
=
sub2ind
(
size
(
im
),
Cells
(
i
)
.
pts
(:,
2
),
Cells
(
i
)
.
pts
(:,
1
));
bw
(
idx
)
=
1
;
end
for
i
=
1
:
length
(
Cells
)
if
is3D
(
im
)
...
...
@@ -41,11 +46,13 @@ for i=1:length(Cells)
imBGmu
=
median
(
imBG
(
idx
));
if
sensitivity
>
1
minFG
=
T
;
imBGeff
=
1
-
imBGmu
/
minFG
;
%
else
minFG
=
max
(
T
(
idx
));
imBGeff
=
1
-
median
(
imBG
(
idx
)
-
T
(
idx
));
end
imBGeff
=
1
-
imBGmu
/
minFG
;
%
imBGeff
=
min
(
imBGeff
,
1
);
% clamp??? ac 10 14 2020 ??? ACK
% imBGeff=min(imBGeff,1);
% imBGeff=max(imBGeff,0);
% how dark on average the surface neighborhood is (1 is good)
Cells
(
i
)
.
ensemble
.
boundaryEfficiency
=
imBGeff
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment