Commit 3c0ba5f0 authored by M. Julius Hossain's avatar M. Julius Hossain Committed by Christian Tischer
Browse files

Binarization update

parent e20e9afc
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
Supports Markdown
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