Image Processing with Matlab - Dashed line

Discussion in 'Programmer's Corner' started by chaosweapon, Oct 21, 2011.

  1. chaosweapon

    Thread Starter Member

    Nov 14, 2008
    15
    0
    I have a black and white dashed line with some noise in the background (example attached). Any ideas how can I identify the line (assuming that I already know a point on the line)? Please note the the line can also be curved so I think the gradient would be useless in that case.
     
  2. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    Is the line continuous, without any breaks in its path? If it is so, track it from its adjacent points.

    And how exactly do you want to identify it? What do you mean my that?
     
  3. chaosweapon

    Thread Starter Member

    Nov 14, 2008
    15
    0
    The image is not continuous because it is dashed. Look at the example image I attached in the first post. The line starts from the left-side. If you look carefully you will notice that it consists of 3 segments. The rest is noise. I want Matlab to point out which pixels are noise and which ones belong to the line.
     
  4. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    If I'm not mistaken, you can access the image pixels one by one. Detect one portion of the line, maybe through the way I told you, about adjacent pixels, and then formulate a ponynomial line to extend it to the whole image. Within some error margin, you could search for line pieces in the polynomial's area.

    Alternatively, a kalman filter may work, after you find your main line, but that would be more advanced.
    http://www.youtube.com/watch?v=0GSIKwfkFCA
     
    chaosweapon likes this.
Loading...