Abstract:The state of the electrical cabinet is characterized by the color and on and off state of the indicator light installed on the cabinet. A method based on Hough transform and HSV color space is proposed and used to recognize the state of electrical cabinet intelligently in this paper. Firstly, the method carries out the pretreatment for the cabinet image captured in real time, and gains the binary edge image. Secondly, the Hough gradient method is used to detect the circle containing the indicator light in the binary edge image, and the invalid circle is removed by RGB threshold screening, connected domain labeling and circle contour threshold screening. Then, according to the V value of the HSV eigenvalues of the images at the center of these circles, the on and off state of the indicator light is judged. Finally, based on the H, S and V values of the image at the edge of the circle, the color discrimination model of the indicator light is established, and the color categories (red, green and yellow) of the indicator light are intelligently judged. Experimental results show that this method can identify the indicator light and its color quickly and accurately, and the accuracy is above 98%.