How do I convert a race track image file into X,Y coordinates?

4 ビュー (過去 30 日間)
Nikhil Dhawan
Nikhil Dhawan 2017 年 1 月 23 日
コメント済み: Walter Roberson 2022 年 9 月 27 日
After importing a race track image into MATLAB, I need to convert the image into a set of X,Y coordinates for lap simulation.

回答 (2 件)

Walter Roberson
Walter Roberson 2017 年 1 月 23 日
Probably: threshold and find(). Or perhaps threshold and one of the two boundary tracing routines.

Christoph Hahn
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
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
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 ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by