# compute confidence value using Hough Transform

Hi All,

I am using Hough Transform to detect lines on an image. I want to compute and associate a confidence value with each line. So, I can pick the top 10% lines and used those lines for further analysis. The confidence value indicates the most probable line or edge in an image.

Can you someone guide me ? I want to use a standard approach (used by anyone) to estimate confidence value !!

I saw a discussion that Probabilistic Hough Transform returns lines based on confidence. Such as the 1st line has highest confidence and so on. How that confidence is computed and is there a way to get those confidence values? Or is there a way to get the accumulator peaks associated with each point detected by Hough transform

edit retag close merge delete

Where did you see the mention of confidence in the documentation?

( 2018-04-02 12:25:15 -0600 )edit
( 2018-04-02 13:16:08 -0600 )edit

This modification was made for the standard Hough transform. It does not detect line ends.

( 2018-04-02 13:41:54 -0600 )edit

My mistake. Question is edited

( 2018-04-02 15:29:47 -0600 )edit

Sort by ยป oldest newest most voted

Probabilistic Hough (as of version 2.4.13.2) does not calculate confidence of results. It doesn't create rating of lines so that you could pick the best from top. It just randomly takes a dot from the image, checks whether it belongs to some line, then detects the ends of that line. Confidence here is in the form of threshold which cuts off bad candidates at the bottom.

more

2.4.13 is some kind of maintainance release (dead end), no updates will get in there ever.

( 2018-04-02 13:18:43 -0600 )edit

sorry my mistake.. I saw it on some discussion on a forum ... So, it means there is no way to associate a confidence value with a line. Can you suggest some way to compute a confidence value ?

( 2018-04-02 15:11:03 -0600 )edit

I checked version 3.4.0. This function works the same way. What you ask about is a big problem. Hough transform is probably the best method for line detection, but it exists in 2 variants, each with advantages and disadvantages. Standard Hough is better developed theoretically (there is even implementation for generalized Hough), but it outputs only theta and rho. Even doesn't check line continuity. It well may be just a few dots scattered across screen along one line. Probabilistic Hough is more practical. Determines ends and checks continuity, but it can't do what you want in principle. Looks like standard Hough indeed sorts lines by accumulator value. That is your confidence is the number of votes. You have no access to the values themselves, but you can set a threshold for the top and

( 2018-04-03 03:16:24 -0600 )edit

... they should come out in the sorted order.

( 2018-04-03 03:17:29 -0600 )edit

Official site

GitHub

Wiki

Documentation