Sign up ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I've been working for a while on a pet problem. The task is to identify and segment out the dark lines and possibly the wiggly ones too.

I'm not looking for anyone to solve this problem for me...I'm just at the point where I feel I'm losing my footing and could benefit from some ideas!

I've so far focussed on neural networks with varying degrees of not-super-success. The nns haven't given much more success than some threshholding. I have tried edge detection but the results look messy. A shrink, laplace, expand showed some promise. Hough seems they should work but not yet(for me, anyway).

thanks.example of source image from which to extract the dark lines

share|improve this question
what is that thing? – Aaron Mar 7 '14 at 9:15
@TomHall I reckon an autoencoder could be used to learn features and then one could put a classification layer. I have been following and some of the techniques they used. The prediction of a small area using a larger context is the way to go. I have had some issues, I'm looking for another strategy to give my brain a break. An autoencoder would use a similar approach to the 'pre-training' that Minh-Hinton did. I've been trying to skip the pretraining by using some dropout. – user1269942 Mar 7 '14 at 18:12
@Aaron it's an image that was created from a lidar point cloud. – user1269942 Mar 7 '14 at 18:12
You might have better luck over at the signal processing stackexchange. This is basically their bag. – David Marx Mar 7 '14 at 20:56
@user1269942 lidar point cloud of what? What is the nature of the scene/object being scanned with lidar? It is not vital piece of info for an answer, I am just curious. – visoft Mar 19 '14 at 20:21

4 Answers 4

Those are nice long and straight lines, so with the right pre-processing I'm confident the Hough transform will find them. I think the key is the pre-processing step - you'll want to enhance line-like structures at a local level.

One option would be to use Gabor filters. At each location, apply a bank of filters at different orientations, and keep the strongest result (this will occur when the filter is aligned with the line). Next, apply a global threshold. The output should have good coverage for line pixels, and noise scattered pretty randomly everywhere else. Now you're ready to apply the Hough transform. Hope that helps.

share|improve this answer
That's exactly what I'd do. As for the wiggly lines, just dilate it once or twice with a small structuring element - so the wiggle will roughly become a straight line - and run Hough line detection. – felipeduque 2 days ago

Autoencoder is a model using Neural Networks to extract features. However it is a unsupervised learning algorithm, we cannot sure what feature could be found. It is possible for it to find a line to be an valuable feature if the line is obvious and clear, or appear in many pictures.

I have no experience in filters, but I think what @NGY mentioned are more important.

share|improve this answer

In retinal images there is an issue that is detecting vessels. One of the used approaches is the use of a matched filter (basically a filter with a kernel similar to structure that you want to detect). Maybe this filter can be used as preprocessing.

Another idea based on vessel segmentation is the use of a top-hat filtering with a linear structure.

You can look in to both of these ideas in here (the top hat in this case is in a binary image, but can use it in a greyscale image):

share|improve this answer
I will add to this answer that one of the major algorithm used to extract vessel from an image in medical image processing is Frangi algorithm. – Al_th Mar 10 '14 at 10:04

I ran this through Grompone von Gioi's Line Segment Detector and got this: result of Line Segment Detector

Of course, the segment detector returns the coordinates of the segments, so you could run a simple RANSAC filter on the data, and you should get a decent result. If your feeling lazy, you could run a Hough filter on this output image and get a reasonable result, though that's a bit of a hack. As mentioned, reprocessing will return a much better result. Perhaps with some sort of steerable filter.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.