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

Merge branch 'binarization_julius' into 'master'

Binarization julius

See merge request !11
parents 2e7243fc cd90fd19
# Image binarization
<img src='
digraph G {
shift [fontcolor=white,color=white];
intenstiy_image -> threshold;
threshold -> background [label=" <threshold"];
threshold -> foreground [label=" >=threshold"];
background -> binaryimage;
foreground -> binaryimage;
binaryimage -> 0 [label=" background"];
binaryimage -> 1 [label=" foreground"];
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
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