MATLAB Answers

What techniques can I use to extract horizontal lines from noisy image data?

12 views (last 30 days)
Hi guys
Im trying to extract the internal layers of an ice sheet. These layers are caused by volcanic activity and are visible in ground penetrating radar measurements as horizontal lines (see example here:
In the lower part of the image however, the horizontal signals are indistinguishable from the ambient noise. (see zoom of previous example here:
I have been messing around with several filtering techniques both in Matlab, Photoshop and a few other photoprograms, and was wondering if anyone had any tricks up their sleeve in here, so as to unveil, or at least remove slightly from obscurity, these hidden layers.
Thanks in advance!

Sign in to comment.

Accepted Answer

Jakob Sievers
Jakob Sievers on 21 Mar 2011
Hi guys!
Thanks for all the ideas. Just thought I'd say what I ended up doing. Rather than messing around too much with filters (as this proved to have little overall effect) I chose instead to trace those fragments of layers that could be seen, as well as the bedrock (bottom layer, completely visible) and the last visible layer before the noisy region. I then extrapolated the inclinations into all the missing (noisy) areas and were then able to uncover the most likely evolution in the data, by drawing streamlines through the inclination-matrix. Illustrations can be found here:

More Answers (2)

Brett Shoelson
Brett Shoelson on 3 Feb 2011
Jakob, When your signal looks a lot like your noise, separating the two is very difficult, if not impossible. But in this case, I think that you can do a reasonable job of detecting the horizontal lines. I'd start by: 1) converting to grayscale, if necessary. (Sometimes an image looks like a grayscale, but it's really RGB. Use size(img) to see if it is m x n x 3. If so, select a single color plane, or use RGB2GRAY.) 2) Use a median filter to eliminate some of the speckle noise. (MEDFILT2) 3) Try using an edge detection algorithm. (See EDGE.) Sobel and Prewitt allow you to specify the direction (horizontal or vertical) of the edges, but you might get the best results here with Canny. Note that the Canny routine allows you to specify Threshold and Sigma parameters; you'll have to play with those to get good results. (HINT: use the iterator tools in cell mode!) 4) Use Hough transforms to accumulate pixels along specified directions. (Help HOUGH, HOUGHPEAKS, HOUGHLINES.) Again, note that there are optional inputs to these functions that will be quite useful. Good luck! Brett
  1 Comment
Ashish Uthama
Ashish Uthama on 3 Feb 2011
Jakob, you could also try anisotropic filters in step 2. ( or similar.

Sign in to comment.

Image Analyst
Image Analyst on 24 Dec 2011
You removed your image so I can't see what it looks like, but RANSAC is really good at finding lines in extremely noisy data. See

Community Treasure Hunt

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

Start Hunting!