Why am I getting different results when I ask to find the centroid of an image
1 view (last 30 days)
I have been using the following commands to find the centroid of a gray scale image derived from a color image in photoshop by changing the mode to gray scale:
grayImage = imread('2014-0825.jpg');
stats = regionprops(true(size(grayImage)), grayImage, 'WeightedCentroid');
centroid = stats.WeightedCentroid
previously I would get two numbers indicating the x and y pixels of the centroid Now using new images I get the results
What is this?
Image Analyst on 13 Nov 2015
You always (since R2008a) would get a 2 element array with the (x,y) or (column, row) of the weighted centroid. Nothing has changed. What two different results are you getting?