summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/toolbox/MultiNcut/readimage.m
blob: e45fa19075179c6965f87bcb765d60792ef5e700 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function I = readimage(fn,maxSize);

Io = imread(fn);
[nr,nc,nb] = size(Io);

if nb>1,
    I = rgb2gray(Io);
else
    I= Io;
end

%maxSize = 400;
if max(nr,nc) > maxSize,
    I = imresize(I,maxSize/max(nr,nc));
end