Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Toby Hodges
image-analysis-training-resources
Commits
1bfd1d8d
Commit
1bfd1d8d
authored
Jun 17, 2019
by
Christian Tischer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'binarization_update' into 'master'
Binarization update See merge request
!32
parents
e20e9afc
3c0ba5f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
_includes/binarization/activities/binarization_matlab.md
_includes/binarization/activities/binarization_matlab.md
+9
-8
No files found.
_includes/binarization/activities/binarization_matlab.md
View file @
1bfd1d8d
```
matlab
function
src_binarize_image
()
%This function illustrates separating foreground from background using a
%fixed threshold value
threshold
=
50
;
%example hreshold value
%These matlab scripts illustrate separating the foreground from the
%background using a threshold value provided by the user
%Prompt user for a threshold value
thres_val
=
input
(
'Enter a threshold value: '
);
%Read input image
in_image
=
imread
([
'image_data'
filesep
'xy_8bit__two_cells.tif'
]);
figure
;
imagesc
(
in_image
);
%display input image
%Binarize
d
input image with the threshold value
;
bin_image
=
uint8
(
in_image
>=
thres
hold
);
figure
;
imagesc
(
bin_image
)
%
d
isplay binary image
end
%Binarize input image with the threshold value
in_image
bin_image
=
uint8
(
in_image
>=
thres
_val
);
figure
;
imagesc
(
bin_image
)
%
D
isplay binary image
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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