Improved Kmeans Algorithm for Detection in Traffic Scenarios
In the Kmeans cluster segmentation used in traffic scenes, there are often zone optimization and over-segmentation problems caused by the algorithm randomly assigning the initial cluster center. In order to improve the target extraction effect in traffic road scenes, this article proposes an improved Kmeans (IM-Kmeans) method. Firstly, search for the histogram peaks of the whole pixels based on hue, saturation, value (HSV) image, and find the initial cluster centers’ positions and number. Secondly, the noise points which are far away from the center pixel are removed, and then the pixels are classified into the nearest cluster center according to its value. Finally, after the clustering model reaches convergence, the area-clustering method is used for another classification to solve the over-segmentation problem. The simulation and experimental comparisons show that the IM-Kmeans algorithm has higher clustering accuracy than the traditional Kmeans algorithm.