Abstract:Aiming at the false alarm caused by mechanical fault when the oil level of traditional gas relay is abnormal, a method for measuring the oil level of gas relay based on machine vision is proposed, which provides a new method for detecting the abnormal oil level of gas relay and effectively improves its working safety. Due to the complex background and large interference in gas relay window, the traditional liquid level extraction method based on image processing has a large error and can not obtain satisfactory results. Therefore, an algorithm combining color space domain conversion and structure complexity of Canny edge detection is proposed to extract the oil level of gas relay. The experimental results show that the proposed algorithm is better than the traditional method in the extraction of oil level of gas relay, and can meet the actual engineering needs.