function testseg(filename)

% tests both enthropy, otsu

im = imread(filename);
% Get the size of input image
dim = size(im);
% Change input image to gray scale (if needed)
leng = length(dim);
if leng == 3
    im = rgb2gray(im);
end

% find and print threshold
otsuth = otsu(im)

% Segment the input image
otsubw = (im>=otsuth);

% find and print threshold
entth = enthropy(im)

% Segment the input image
entbw = (im>=entth);

subplot(2,1,1);
imshow(otsubw);
subplot(2,1,2);
imshow(entbw);
