how to middle?

4 visualizzazioni (ultimi 30 giorni)
JoBrr
JoBrr il 19 Mag 2019
Modificato: JoBrr il 29 Mag 2019
i want to find middle

Risposta accettata

darova
darova il 19 Mag 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 Commenti
JoBrr
JoBrr il 21 Mag 2019
Thank you @darova much appreciated!!
darova
darova il 21 Mag 2019

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Images in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by