Draw line and Cut off Circuler area

后端 未结 2 452
半阙折子戏
半阙折子戏 2021-01-23 08:19

I have got the below Image after running the below code.

file=\'grayscale.png\';
I=imread(file);
bw = im2bw(I);
bw = bwareaopen(bw,870);
imwrite(bw,\'n         


        
2条回答
  •  一个人的身影
    2021-01-23 08:48

    The convexhull of the white pixels will give you a fairly good approximation of the circle. You can find the center as the centroid of the area of the hull and the radius as the average distance from the center to the hull vertices.

提交回复
热议问题