% Get the center and radius of the chrome.
function [center, radius] = getCenterfSphere(chromeMask)


%grayMask = (chromeMask);

%find the white part of  the image;
 [y,x] = find(chromeMask);

width = max(x)- min(x);
height = max(y) - min(y);

center_x = round(min(x) + width/2);
center_y = round(min(y) + height/2);
center = [center_y center_x];
radius = sqrt(width^2 + height^2)/2;


