First time here? Check out the FAQ!

Ask Your Question
1

Drawing Houghlines until they intersect with another

asked Sep 24 '14

Icetray gravatar image

Hi Guys,

I'm looking to draw houghlines from my canny edge image.

I'm looking to fill in gaps. So the line should be drawn until it hits another white pixel or until it hits a max length.

Is this possible?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
2

answered Sep 24 '14

ilyakava gravatar image

The code in this tutorial has exactly what you need.

Preview: (hide)

Comments

Would it be possible to apply the same techniques even if my lines aren't straight? Perhaps a lower number of voting points or something? I'm looking to get a clear canny edge using this.

Icetray gravatar imageIcetray (Sep 24 '14)edit
1

Depends on your image... But hough lines must in the end be straight, since each line is described by only two metrics: normal distance from origin and angle (from horizontal I think). You can however lower your rho and theta resolution when searching for hough lines, which will give you a coarser accumulation matrix, giving you some leeway when fitting the lines. If when you say that your lines aren't straight you mean that they are curved, then you are better off with the findContours method, which has served me well in the past

ilyakava gravatar imageilyakava (Sep 24 '14)edit

Question Tools

Stats

Asked: Sep 24 '14

Seen: 415 times

Last updated: Sep 23 '14