I run the script:
>> grayImage = imread('gray.image.jpg');stats = regionprops(true(size(grayImage)), grayImage, 'WeightedCentroid');stats = regionprops(true(size(grayImage)), grayImage, 'WeightedCentroid');centroid = stats.WeightedCentroid
and get two numbers representing the x and y coordinates of the center of mass
However, when I replace gray-image.jpg with RGB.jpg (i.e. gray-image.jpg that is actually a RBG file I gets three values. The first two are close to the values the grayImage and the third is much smaller
for example instead of 247.2652 313.9184. I get 246.0814 315.0654 1.9728
what is the meaning of 1.9728?
Best Answer