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
003745f0
Commit
003745f0
authored
May 16, 2020
by
actb
Browse files
Options
Downloads
Patches
Plain Diff
2d/3d thresholdImages same, logScale=[.25,.25,1.25]
parent
95838369
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
matlab/+Segment/getImages.m
+1
-1
1 addition, 1 deletion
matlab/+Segment/getImages.m
matlab/+Segment/segReduce.m
+1
-1
1 addition, 1 deletion
matlab/+Segment/segReduce.m
matlab/+Segment/thresholdImages.m
+3
-17
3 additions, 17 deletions
matlab/+Segment/thresholdImages.m
with
5 additions
and
19 deletions
matlab/+Segment/getImages.m
+
1
−
1
View file @
003745f0
...
@@ -117,7 +117,7 @@ end
...
@@ -117,7 +117,7 @@ end
function
imLog
=
msLog
(
im
,
min_radius_pixels
)
function
imLog
=
msLog
(
im
,
min_radius_pixels
)
logScale
=
[
0.25
:
0.25
:
2
];
logScale
=
[
0.25
:
0.25
:
1.25
];
imLogCombined
=
[];
imLogCombined
=
[];
if
length
(
min_radius_pixels
)
==
3
&&
min_radius_pixels
(
3
)
>
0
if
length
(
min_radius_pixels
)
==
3
&&
min_radius_pixels
(
3
)
>
0
% 3d
% 3d
...
...
This diff is collapsed.
Click to expand it.
matlab/+Segment/segReduce.m
+
1
−
1
View file @
003745f0
...
@@ -13,7 +13,7 @@ else
...
@@ -13,7 +13,7 @@ else
end
end
%
%
bwOut
=
bw
;
bwOut
=
bw
;
nIter
=
100
;
%10
*max(min_radius_pixels);
nIter
=
pi
*
max
(
min_radius_pixels
)
/
2
;
for
nDilate
=
1
:
nIter
for
nDilate
=
1
:
nIter
bwKernels
=
bwOut
&~
bwLog
;
bwKernels
=
bwOut
&~
bwLog
;
bwKernels
=
Segment
.
aiAreaOpen
(
bwKernels
,
0.5
*
min_radius_pixels
);
bwKernels
=
Segment
.
aiAreaOpen
(
bwKernels
,
0.5
*
min_radius_pixels
);
...
...
This diff is collapsed.
Click to expand it.
matlab/+Segment/thresholdImages.m
+
3
−
17
View file @
003745f0
...
@@ -21,34 +21,20 @@ if sensitivity>1 && round(sensitivity)==sensitivity
...
@@ -21,34 +21,20 @@ if sensitivity>1 && round(sensitivity)==sensitivity
return
;
return
;
end
end
if
is3D
(
im
)
nsz
=
2
*
floor
(
size
(
im
)/
16
)
+
1
;
T
=
adaptthresh
(
imLog
,
0.5
,
'NeighborhoodSize'
,
nsz
,
'statistic'
,
'gaussian'
);
bwLog
=
imbinarize
(
imLog
,
T
);
bwLog
=
Segment
.
aiAreaOpen
(
bwLog
,
min_radius_pixels
);
nsz
=
4
*
floor
(
size
(
im
)/
16
)
+
1
;
T
=
adaptthresh
(
im
,
sensitivity
,
'NeighborhoodSize'
,
nsz
,
'statistic'
,
'gaussian'
);
bw
=
imbinarize
(
im
,
T
);
bw
=
Segment
.
aiAreaOpen
(
bw
,
min_radius_pixels
);
return
;
end
if
segParams
.
isPhase
if
segParams
.
isPhase
[
bw
,
bwLog
]
=
phaseThreshold
(
im
,
bwLog
,
min_radius_pixels
,
segParams
,
...
[
bw
,
bwLog
]
=
phaseThreshold
(
im
,
bwLog
,
min_radius_pixels
,
segParams
,
...
sensitivity
,
medianMask
);
sensitivity
,
medianMask
);
return
;
return
;
end
end
% else (not 3d)
nsz
=
4
*
floor
(
size
(
im
)/
16
)
+
1
;
nsz
=
4
*
floor
(
size
(
im
)/
16
)
+
1
;
T
=
adaptthresh
(
imLog
,
0.5
,
'NeighborhoodSize'
,
nsz
,
'statistic'
,
'gaussian'
);
T
=
adaptthresh
(
imLog
,
0.5
,
'NeighborhoodSize'
,
nsz
,
'statistic'
,
'gaussian'
);
bwLog
=
imbinarize
(
imLog
,
T
);
bwLog
=
imbinarize
(
imLog
,
T
);
bwLog
=
Segment
.
aiAreaOpen
(
bwLog
,
min_radius_pixels
);
bwLog
=
Segment
.
aiAreaOpen
(
bwLog
,
min_radius_pixels
);
% use 2x the default nhood size
nsz
=
4
*
floor
(
size
(
im
)/
16
)
+
1
;
T
=
adaptthresh
(
im
,
sensitivity
,
'NeighborhoodSize'
,
4
*
floor
(
size
(
im
)/
16
)
+
1
,
'statistic'
,
'gaussian'
);
T
=
adaptthresh
(
im
,
sensitivity
,
'NeighborhoodSize'
,
nsz
,
'statistic'
,
'gaussian'
);
bw
=
imbinarize
(
im
,
T
);
bw
=
imbinarize
(
im
,
T
);
bw
=
Segment
.
aiAreaOpen
(
bw
,
min_radius_pixels
);
bw
=
Segment
.
aiAreaOpen
(
bw
,
min_radius_pixels
);
4
;
4
;
...
...
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