# Race circuit line extraction

Hello,

I am looking for information on getting the image below. It is an image of a circuit/race-track, with curved and straight lines. I am trying to mask the image in order to only track the border lines of the circuit. I believe it has been taken with a monocular camera.

I have checked the hough transform but it seems it only detects straight lines.

Any comment is welcomed. Thank you!

edit retag close merge delete

Sort by ยป oldest newest most voted

Your task is similar to finding lane lines on a road. You can try the following approach

1. Make bird eye view image
2. Extract white pixels by color threshold or gradients or some combined technique
3. Split your image vertically by line of some height like 50 pixels
4. Build histogram of bottom line
5. Find coordinates of X where histogram peaks are appear, using come assumptions about lane width.
6. Switch to next line and start search from X coordinate that previous line was found using sliding window. Extract center of mass in the window by color and get new centers coordinates by X
7. Repeat step 6 to top line
8. Approximate found coordinates by spline Now you found both lines.

You can find detailed description here. BTW, this is a course project offered by Udacity learning platform. You can find a bunch of implementations of this project on github by googling 'udacity advanced lane lines'.

more

Perfect! I am trying it rigth now! Also, do you have any idea of how I could register the lines in order to make a map of the circuit?

( 2020-09-01 03:17:32 -0500 )edit

You can convert local coordinates of each frame (X,Y) to some global frame using odometry. But I don't get your point to build map. You need some kind of localization techniques to use map. If we talk about circuit I don't see any valid features to distinguish between them. It's the same in every place of the circuit. So to localize on a map you need some distinguishable features of your map.

( 2020-09-01 03:27:01 -0500 )edit