HoughFeature.accumulator#
- HoughFeature.accumulator(skip: int = 1) None[source]#
Compute the Hough accumulator
- Parameters:
skip (int, optional) – increment for line strength threshold, defaults to 1
It creates two new attributes for the instance:
Awhich is the Hough “accumulator” array, rows represent \(\rho\) and columns represent \(\theta\).votesis a list of the number of lines found versus threshold, it can be used to select an optimal threshold.extentis \([\theta_{\mbox{min}}, \theta_{\mbox{max}}, \rho_{\mbox{min}}, \rho_{\mbox{max}}]\).
Warning
The OpenCV
HoughLinesfunction does not expose the accumulator array. This method “reverse engineers” the accumulator array through a costly process of computing the Hough transform for all possible thresholds (increasing in steps ofskip). This is helpful for pedagogy but very inefficient in practice.- Seealso: