for calculating the difference between histograms of two images.
Best Answer
Z = imabsdiff(X,Y) subtracts each element in array Y from the corresponding element in array X and returns the absolute difference in the corresponding element of the output array Z. If you passed two count arrays (histograms) in for X and Y, it would give the absolute value of the count differences, but what does that mean? Probably not what you hope it might. What are you trying to accomplish?
After that, if you need spatial centroids (x,y,z locations) in addition to color centroids (the RGB values of the color clusters' centroids), it's a simple matter to find centroids using bwlabel() and regionprops(), like in my BlobsDemo (http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 ).
Best Answer