comparing histograms with matlab through pdist2 -
i'm trying compare histogram of image (hsv) cell array contains histograms of other images in order find out closest matches. have far:
image compare database:
im=imread(name); resizedimage = imresize(im,[75 75]); image = rgb2hsv(resizedimage); h = image(:,:,1); [hist, colorbins]= imhist(h); hist_testing=hist';
images compare:
im=imread(filename); resizedimage = imresize(im,[75 75]); image = rgb2hsv(resizedimage); h = image(:,:,1); data {i,1}= histogram(h);
the histogram class represented this:
function [hist] = histogram(h) [hist, colorbins]= imhist(h); hist=hist'; end
through pdist2 method usage:
comphist= pdist2(hist_testing, hist, 'euclidean');
the error gives me "not enough arguments input". can please me?
Comments
Post a Comment