Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Measuring of lanes or stripes on noisy and underexposed images

I've got a task of measuring of lanes or stripes on severely varied, often noisy and underexposed images using C++. The example ot the input image and of what should be measured is below:

An example of what should be measured on images provided

I've tried a couple of approaches using OpenCV so far. The first one basically consisted of the next steps:

Filtering, background substruction -> adaptiveThreshold -> thinning -> HoughLinesP -> and then filtering and merging of lines.

Please see the llustration image below:

The first attempt result

The second approach comprised of search for the beginnings of short stripes with SURF and movement to the left and up along long lines.

Please see the llustration image below, note that SURF was done on the original halftone image:

The second attempt result

The third approach I've tried: doing the Fourier transform for frames - image fragments (a 4-dimensional matrix is obtained), then finding basic patterns using PCA. Got this result below:

The third attempt result

Not sure what to do with that PCA output. Have tried to select lines using adaptiveThreshold using original image, then teach the multilayer perceptron based on this threshold and the PCA result so that it would yield "refined" threshold. An attempt was made to select the parameters resulting in a cleared threshold for further treatment - it works occasionally, but the result is very unstable.

Unfortulately all the approaches above work only with few selected "good" images.

I presume that the ML approach would be the way to go. Unfortunately I have only few images for learning.

I would greatly appreciate any suggestions on moving forward to solving this task.

Some test source images can be found here: github.com/aliakseis/detect-lines/tree/master/images

Measuring of lanes or stripes on noisy and underexposed images

I've got a task of measuring of lanes or stripes on severely varied, often noisy and underexposed images using C++. The example ot the input image and of what should be measured is below:

An example of what should be measured on images provided

I've tried a couple of approaches using OpenCV so far. The first one basically consisted of the next steps:

Filtering, background substruction -> adaptiveThreshold -> thinning -> HoughLinesP -> and then filtering and merging of lines.

Please see the llustration image below:

The first attempt result

The second approach comprised of search for the beginnings of short stripes with SURF and movement to the left and up along long lines.

Please see the llustration image below, note that SURF was done on the original halftone image:

The second attempt result

The third approach I've tried: doing the Fourier transform for frames - image fragments (a 4-dimensional matrix is obtained), then finding basic patterns using PCA. Got this result below:

The third attempt result

Not sure what to do with that PCA output. Have tried to select lines using adaptiveThreshold using original image, then teach the multilayer perceptron based on this threshold and the PCA result so that it would yield "refined" threshold. An attempt was made to select the parameters resulting in a cleared threshold for further treatment - it works occasionally, but the result is very unstable.

Unfortulately all the approaches above work only with few selected "good" images.

I presume that the ML approach would be the way to go. Unfortunately I have only few images for learning.

I would greatly appreciate any suggestions on moving forward to solving this task.

Some test source images can be found here: github.com/aliakseis/detect-lines/tree/master/images

Please find an update here: https://github.com/aliakseis/detect-lines Any suggestions would be highly appreciated.