Commit ccbd36e1 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

Merge branch 'binarization_julius' into 'master'

Matlab code added on

See merge request grp-bio-it/image-analysis-training-resources!15
parents f2bcd0d3 84bcf130
Pipeline #9772 passed with stages
in 1 minute and 2 seconds
......@@ -74,8 +74,26 @@ IJ.setRawThreshold(inputImage, 60, 255, None)
binaryImage=ImagePlus('Binary image',Thresholder.createMask(inputImage))
<summary>MATLAB Script</summary>
function src_binarize_image()
%This function illustrates separating foreground from background using a
%fixed threshold value
threshold = 50; %example hreshold value
%Read input image
in_image = imread(['image_data' filesep 'xy_8bit__two_cells.tif']);
figure; imagesc(in_image); %display input image
%Binarized input image with the threshold value;
bin_image = uint8(in_image>= threshold);
figure; imagesc(bin_image) % display binary image
## Formative assessment
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment