how to middle?

1 回表示 (過去 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 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by