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
IAH public
DeProj
Commits
71cce598
Commit
71cce598
authored
Dec 04, 2019
by
Jean-Yves TINEVEZ
Browse files
Example usage of mask_to_cells.
parent
3653b49d
Changes
1
Hide whitespace changes
Inline
Side-by-side
MainScripts/InputSegmentation.m
0 → 100755
View file @
71cce598
close
all
clear
clc
mask_path
=
'GT.tif'
;
% ImageJ mask.
I
=
imread
(
mask_path
);
tic
[
objects
,
junction_graph
]
=
mask_to_objects
(
I
);
fprintf
(
'Analyzed a %d x %d mask in %.1f seconds.\n'
,
size
(
I
,
1
),
size
(
I
,
2
),
toc
)
%% Plot everything.
figure
imshow
(
~
I
,
[
0
2
],
'Border'
,
'tight'
)
hold
on
plot
(
junction_graph
,
...
'XData'
,
junction_graph
.
Nodes
.
Centroid
(:,
1
),
...
'YData'
,
junction_graph
.
Nodes
.
Centroid
(:,
2
),
...
'LineWidth'
,
2
,
...
'EdgeColor'
,
'b'
,
...
'EdgeAlpha'
,
1
,
...
'Marker'
,
'o'
,
...
'MarkerSize'
,
4
,
...
'NodeColor'
,
'r'
)
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