how to middle?

4 次查看(过去 30 天)
JoBrr
JoBrr 2019-5-19
编辑: JoBrr 2019-5-29
i want to find middle

采纳的回答

darova
darova 2019-5-19
If you have only circle on the image like below
img.png
clc,clear
I = imread('img.png');
I1 = im2bw(I,graythresh(I)); % binarize image (0,1)
[row, col] = find(I1); % find white pixels (1 value)
ix = round( mean(col) ); % mean column
iy = round( mean(row) ); % mean row
imshow(I1)
hold on
plot(ix,iy,'or')
text(ix+10,iy+10,'CircleCenter')
hold off
  4 个评论
JoBrr
JoBrr 2019-5-21
Thank you @darova much appreciated!!
darova
darova 2019-5-21

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by