MATLAB: How to measure the moon crescent

Image Processing Toolboximage segmentationmooncrescentregionprops

Hi, anyone can help me how to measure the moon crescent using regionprops and how to remove the unwanted object in the image?

Best Answer

Right now i want to measure the area of the crescent and then viscircles on it.
Using this FEX package,
load(websave('Image','https://www.mathworks.com/matlabcentral/answers/uploaded_files/467970/Image.mat'))
BW0=BW;
imshow(BW0);
BW = bwpropfilt(BW,'EquivDiameter',2);
crescentArea=bwarea(BW)
crescentArea = 1.2870e+04
[y,x]=find(bwskel(BW));
obj=circularFit([x,y].'); %EDIT
imshow(BW);
hold on
viscircles(obj.center,obj.radius);
hold off