How do I convert a race track image file into X,Y coordinates?
4 次查看(过去 30 天)
显示 更早的评论
After importing a race track image into MATLAB, I need to convert the image into a set of X,Y coordinates for lap simulation.
0 个评论
回答(2 个)
Walter Roberson
2017-1-23
Probably: threshold and find(). Or perhaps threshold and one of the two boundary tracing routines.
0 个评论
Christoph Hahn
2017-2-14
Hi Nikhil,
please consider uploading an image to be able to provide better support.
Assuming that you are working with binary images (binary -> black-white; if not, please consider converting) that may be a quite straightforward task. I suggest you have a look into the function list of image processing toolbox. What about 'edge'- and 'bwboundaries'-function.
Again, please consider providing an actual image to allow for better support.
Cheers Christoph
5 个评论
Demi Milet
2022-9-27
Can u maybe explain this code? im trying to use this for an image of a track of my own, but i get an error.
Walter Roberson
2022-9-27
What error do you get? You would get an error in the plot in trying to use B{3} if you do not have something equivalent to the small island at the bottom right where the checkered flag is.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modify Image Colors 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!