function [xCentroid,yCentroid] = getCentroid(inputImage)%,maskImage)

maskImage = ones(size(inputImage,1),size(inputImage,2));
stats = regionprops(maskImage,inputImage, 'WeightedCentroid');

coordinates = stats(1).WeightedCentroid;
xCentroid = coordinates(1);
yCentroid = coordinates(2);
end