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

조회 수: 13 (최근 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 CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by