how to middle?

4 Ansichten (letzte 30 Tage)
JoBrr
JoBrr am 19 Mai 2019
Bearbeitet: JoBrr am 29 Mai 2019
i want to find middle

Akzeptierte Antwort

darova
darova am 19 Mai 2019
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 Kommentare
JoBrr
JoBrr am 21 Mai 2019
Thank you @darova much appreciated!!
darova
darova am 21 Mai 2019

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by