insertshape auto find the coordinate of the object
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
MUHAMMAD NAZMI ZAINAL AZALI
il 10 Nov 2019
Commentato: Image Analyst
il 10 Nov 2019
Hi, may i know how to insertshape auto find the coordinate of the object that in black pixel in the image?
0 Commenti
Risposta accettata
Walter Roberson
il 10 Nov 2019
Modificato: Walter Roberson
il 10 Nov 2019
info = regionprops(~TheImage, 'Centroid');
coords = vertcat(info.Centroid);
x_coords = coords(:,1);
y_coords = coords(:,2);
but remember that x corresponds to columns and y corresponds to rows.
2 Commenti
Image Analyst
il 10 Nov 2019
isertShape does not "find" regions in an image. Finding regions is what regionprops() does.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Tracking and Motion Estimation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!