MATLAB: Draw a circle and measure the white pixels area inside

circle area

Hello everyone, a binary image is obtained. The work is to draw concentric cirles in the image and calculate the area of the white pixels in each circle. The objective is to get a curve.
I attached an image as an example.

Best Answer

You can construct a distance-squared matrix once. Then you can
sum(bsxfun(@le, distance_squared_matrix(:), radius_row_vector.^2))
to get the counts.