object detection in a binary image
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
taher taher
el 13 de Sept. de 2019
Comentada: taher taher
el 13 de Sept. de 2019
I have converted an image to a biary image (attached). This image inlcudes some black spots that I'd like to have the x and y coordinates of each spot. For example, the attached image have 7 black spots. So I'll have 7 sets of x and y coordinates. I only want the x and y in terms of pixel. I'll convert to actual x and y myself.
Could anyone help me with that?
2 comentarios
Respuesta aceptada
Matt J
el 13 de Sept. de 2019
Editada: Matt J
el 13 de Sept. de 2019
>> bwimage=imbinarize(rgb2gray(imread('bwimage.jpg')));
>> locations=regionprops('table',~bwimage,'Centroid')
locations =
7×1 table
Centroid
________________
284.26 854.72
376.96 328.91
872.47 770.18
1087.9 568.19
1374.2 370.17
1437.1 899.07
1440.4 823.5
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!