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