(a) (b) (c)
Figure 13. Partial view of line detection
This method is compared with the original k-means clustering results, as
shown in Figure 14. Figure 14a shows the clustering results of the
original k-means algorithm in the Hough space for the fitted lines at
thresholds of 25, 30, and 35. Use circles and oblique crosses to
represent the centroids of k-means clustering, and data points in
different clusters are represented in different colors. In Figure 14,
when is 25, due to the presence of many interfering line parameter
points in the Hough space, the clustering results are severely affected
by interference, and the interfering points are mistakenly clustered
into one category; When is 30, due to the increase in threshold, some of
the interference line parameter points in the Hough space have been
deleted, but there is still some interference, resulting in inaccurate
clustering results; When is 35, the interfering line parameter points
are further deleted, and the line parameter points within each cluster
happen to be accurate lines, so the clustering results are good. Using
the adaptive threshold proposed in this article combined with an
improved clustering centroid calculation method, In Figure 14b, the
method of determining the optimal adaptive threshold based on
statistical voting numbers adaptively sets according to the distribution
of voting numbers, removes the interfering line parameter points, and
then recalculates the clustering centroid according to the weight
proportion of voting numbers in the clustering results. When the Hough
transform threshold is 25, 30, and 35, clustering analysis can be
completed correctly. Overall, the clustering robustness and accuracy of
the method proposed in this article are superior to the original k-means
clustering. The calculation flowchart is shown in Figure 15.