Reputation: 2053
are there any matlab functions that perform the following :
NxM are the dimensions of the image. I,j are the pixel value(Red for chanel 1, Green for chanel 2, Blue for chanel 3).
Upvotes: 0
Views: 95
Reputation: 14316
You can calculate the first distance by
d1 = sqrt(sum((A(:)-B(:)).^2));
and the second by
% Create histograms
hA = hist(A(:),255);
hB = hist(B(:),255);
% Calculate distance
d2 = sqrt(sum((hA-hB).^2));
Upvotes: 1