if there is an object (say a line) in an image, how to find the xy coordinates of each pixel that makes the line?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Franklin Prashanth C
le 22 Jan 2018
Réponse apportée : Walter Roberson
le 22 Jan 2018
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169299/image.png)
The XY coordinate values of each pixel of the red line. Such that I can trace the line. Thank you.
0 commentaires
Réponse acceptée
Walter Roberson
le 22 Jan 2018
Convert to grayscale. Threshold to select the part that is not as bright -- the brightest part will be the white background. Now you can regionprops() and ask it to return PixelList . (Or you might want to consider using bwboundaries or bwtraceboundary. Or you might want to bwmorph() to extract the skeleton and then ask for those pixels...
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!