opencv - A good approach for detecting lines in an image? -


i've written code uses opencv libraries detect white lines painted on grass. need someone's opinion on approach used (as i'm sure there's better way mine). also, results i'm getting not expected because slight variations in image require tweaking parameters (and need operate on fixed parameters).

my approach far:

  1. grab image webcam (and turn grayscale obviously)
  2. run through threshold filter (using thresh_to_zero mode, zeros out pixels below threshold value).
  3. blur image
  4. run through erosion filter
  5. run through canny edge detector
  6. finally, take processed image , find lines using probabilistic hough transform houghlinesp

should change sequence of filters?

p.s. i'm not concerned processing power; i'm running houghlinesp on gpu b-)

also, here sample image: original image

the results i'm getting: canny with canny without canny (slightly tweaked parameters) no canny time

any or guidance appreciated! have no idea improve it!

update after using quick skeleton implementation (with tons of blur) per chosen answer, got this: it works!

i try use skeleton representation of image. problem canny, here, results in 2 lines because of width of line.

then apply hough transform on it.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -