Automatic top hat¶
The Automatic Top Hat operation is a thresholding algorithm to detect Hough peaks from a HoughMap. The algorithm is based on the top hat algorihm of Gonzalez and Woods [Gonzalez2008]. It consists of performing an opening of the original HoughMap and then subtracting the resultant map with the original map. The opening allows to remove any features and “leaves only an approximation of the background” [Gonzalez2008].
After a threshold opening is performed to detect the peaks. It was found that an average between the threshold value obtained from the minimum error [Kittler1986] and Kapur [Kapur1985] thresholding gives an acceptable thresholding level to detect Hough peaks.