I have this implementation of a function that performs color histogram on an image. and i would like to exclude and eliminate a particular image. is there a way to do it?
for example i want my function to totally forget about the white color.
I do really appreciate your help
Here's the function code:
function H = colorhist(I, nBins)%%RGBHIST: color Histogram of an RGB image.
%
% nBins : number of bins per EACH color => histogram is 'nBins^3' long.
% H : The vectorized histogram.
%if (size(I, 3) ~= 3) error('rgbhist:numberOfSamples', 'Input image must be RGB.')endH=zeros([nBins nBins nBins]);for i=1:size(I,1) for j=1:size(I,2) p=double(reshape(I(i,j,:),[1 3])); p=floor(p/(256/nBins))+1; H(p(1),p(2),p(3))=H(p(1),p(2),p(3))+1; endendH=H(:);% Un-Normalized histogram
H=H./sum(H); %l1 normalization
end
Best Answer