Commit 1bfd1d8d authored by Christian Tischer's avatar Christian Tischer

Merge branch 'binarization_update' into 'master'

Binarization update

See merge request !32
parents e20e9afc 3c0ba5f0
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
%Binarized input image with the threshold value;
bin_image = uint8(in_image>= threshold);
figure; imagesc(bin_image) % display binary image
%Binarize input image with the threshold valuein_image
bin_image = uint8(in_image>= thres_val);
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