I am trying to extract lane boundary lines from two recorded video cameras on the sides of the vehicle. I would ultimately like to calculate lane position from those boundaries.

My thought process is:

  • Convert the video to a series of images.
  • Convert images to grayscale.
  • Identify the portion of the image that has white as opposed to asphalt.
  • Filter unwanted pixels out of the video leaving mostly the lane.
  • Calibrate my camera, so I can know how much 1 pixel is distance wise.
  • Then do the calculations by byte locations in Python to determine the distance.

Does anyone have a recommendation for a image file format? I recall there was a format that has no compression or header. It was basically each pixel had a value from $0$ to $255$ ($0$ is black, $255$ is white I believe), and the byte location in the file represented the pixel. So if you had an image of $640\times 480$ you would have that many bytes.

  • $\begingroup$ why would you use a file format for that? Typically, decompression of video is way faster than reading from a hard drive, and if you store uncompressed images on your permanent storage, faster media like SSDs won't be affordable. I think you might be worrying about the wrong things – it'll be helpful to store the video as sequence of images, but I'd simply use the file format that the libraries you're using support. I really see nil positive effect of storing things uncompressed. Any image processing library can read a few standard image formats, or you just go ahead and use a separate lib. $\endgroup$ – Marcus Müller Mar 28 '17 at 12:31
  • $\begingroup$ Im doing the analysis post process, so I dont really care for storage and that particular format is easy to work with since I can locate byte locations in relation to space very easy. If I was trying to read lane detection in real-time I would 100% try to use images/video with compression. $\endgroup$ – ChipsAhoy Mar 28 '17 at 13:03
  • $\begingroup$ Please don't ask the exact same question twice. (Edit: the duplacate question has been removed). $\endgroup$ – MBaz Mar 28 '17 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.