Ask Your Question
1

Drawing Houghlines until they intersect with another

asked 2014-09-23 20:18:26 -0500

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-09-23 21:05:56 -0500

ilyakava gravatar image

The code in this tutorial has exactly what you need.

edit flag offensive delete link more

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 ( 2014-09-23 21:25:19 -0500 )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 ( 2014-09-23 22:36:23 -0500 )edit

Question Tools

Stats

Asked: 2014-09-23 20:18:26 -0500

Seen: 279 times

Last updated: Sep 23 '14