Hi I would like to find a line in a noisy image as showed bellow. I tried gabor filter and cany edge detection, but it didn't produce anything usefull. I am looking for lines of specific orientation and I don't want to segment them, just to find if the line exist in the picture.

Example pictures with lines

Picture with line 1 picture with line 2 picture with line 3

Example pictures without lines

no line 1 no line 2 no line 3


What about an algorithm in image domain?

For every pixel, check into the direction you desire to know (up-down in your images above, I guess) if there is a pixel with "the same" value (i.e. a value inside an acceptance band, of course. Let's say +/- 10%) as the pixel under investigation. If so, go further into that direction. Count every pixel that you find. If the number of counts exceeds a certain threshold (i.e. 1/4 FOV or so in your case), then there is a line.

I would first try to use something simple like that instead of using more complicated algorithms that might be suitable for different kinds of images. Yours pretty much look like MRI phase images that can be nasty ;) )

  • $\begingroup$ Thanks for the response, that wouldn't work, because it would find a big blobs, that are however not lines. $\endgroup$ – user2173836 Mar 17 '16 at 17:06
  • $\begingroup$ It wouldn't. As I said, you would check for every pixel if it has candidate pixels adjacent to it in only one direction (up-down in your image). Neighboring pixels in the other direction are not taken into account - each pixel column would be treated separately. $\endgroup$ – M529 Mar 17 '16 at 19:18
  • $\begingroup$ You could alternatively define an image containing a line (a line of pixels of a certain lengths that you would accept as a "line"), and then use some image (dis)similarity measures to find structures that match your line image. Maybe even a simple convolution could work. $\endgroup$ – M529 Mar 17 '16 at 19:23

Your Answer

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

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