Signal light fault detection method and system
By acquiring the video data of the signal light, extracting and comparing its external features, the problem of difficulty in non-contact long-distance fault detection in the prior art is solved, the accuracy and stability of the signal light fault detection are achieved, and the detection efficiency is improved.
Patent Information
- Application Number
- CN202410636130.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-05-22
AI Technical Summary
The existing lamp fault detection methods are difficult to conduct contactless long-distance fault measurements when inconvenient to contact, especially in situations where safety and stability of work are required.
By obtaining the video data of the signal light, determining the location of important areas based on the similarity principle, extracting the external features of the working image of the single lamp, building an external feature extraction model, and using mean comparison and threshold values to determine the fault condition to realize the detection of signal light faults.
It improves the accuracy and stability of fault detection, can quickly and at low cost, reduces the impact of brightness differences on fault judgment, and improves detection efficiency.
Smart Images

Figure CN118469966B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lamp fault detection, and more particularly to a signal lamp fault detection method and system. Background Art
[0002] Lamps are widely used in social production and life. The life of lamps varies due to factors such as materials, usage, and maintenance. In some specific occasions, ensuring the normal operation of lamps and timely discovering lamp failures are prerequisites for ensuring safe and stable operation.
[0003] Existing lamp fault detection usually includes power measurement, temperature detection, light measurement and other methods. Among them, power measurement, temperature detection and other fault detection methods are suitable for scenes that are easy for manual contact and for close-range fault detection. However, in some cases where it is inconvenient to conduct device access measurement, how to conduct non-contact long-distance lamp fault measurement is a problem that technicians in this field urgently need to solve. Summary of the invention
[0004] In view of this, the present invention provides a signal light fault detection method and system.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A signal light fault detection method comprises the following steps:
[0007] Step 1, obtaining video data of each traffic light target period;
[0008] Step 2: determining the important area position of each traffic light based on the similarity principle according to the video data, and intercepting the single light video data of the important area position of each traffic light;
[0009] Step 3, extracting a plurality of frames of single-light working images from the single-light video data of each signal light;
[0010] Step 4, preprocessing the single-lamp working image;
[0011] Step 5: construct an external feature extraction model, and extract the external features of each frame of the preprocessed single-light working image to obtain several groups of external features of each signal light;
[0012] Step 6: According to several groups of external features of each traffic light, the average external feature of each traffic light is obtained by taking the average value;
[0013] Step 7: Compare the average external characteristics of each signal light, and also compare with the preset threshold value to determine the fault condition of each signal light when it is working.
[0014] Optionally, in step 2, the method for determining the location of the important area of each traffic light based on the similarity principle and obtaining the video data of a single light is:
[0015] Randomly intercepting two frames of images from the video data as a first frame of image and a second frame of image;
[0016] Taking the position of the traffic light as the region of interest ROI, detecting the region of interest ROI in the first frame image and the second frame image to determine at least one ROI in the first frame image and at least one ROI in the second frame image;
[0017] Calculate the similarity between the ROI in the first frame image and the ROI in the second frame image;
[0018] If the similarity between the ROI in the first frame image and the ROI in the second frame image is lower than a preset threshold, both the ROI in the first frame image and the ROI in the second frame image are added to the ROI to be tracked; otherwise, the ROI in the first frame image or the ROI in the second frame image is added to the ROI to be tracked, and the ROI to be tracked is the important area position of the traffic light;
[0019] The video data is tracked based on the ROI to be tracked to obtain single-light video data of the important area position of each traffic light.
[0020] Optionally, in step 4, the process of preprocessing the single-lamp working image includes denoising and filtering processing for the image.
[0021] Optionally, in step 5, the external characteristics include at least brightness characteristics and chromaticity characteristics of the signal light.
[0022] Optionally, in step 5, the method for constructing the external feature extraction model is:
[0023] Acquire several frames of single-lamp working images as training images;
[0024] Extracting chromaticity features: converting the training image from the RGB color model to the HSI color model, performing channel separation on the HSI color model, extracting the H component grayscale image, counting the number of pixels of each chromaticity in the H component grayscale image, and calculating the chromaticity frequency sequence as the chromaticity features of the training image;
[0025] Extracting brightness features: extracting pixel information of the training image, and determining brightness peak and valley values of the image based on the pixel information as brightness features of the training image;
[0026] Taking the training image as input and the chromaticity feature and the brightness feature as output, an initial neural network model is trained to obtain an external feature extraction model.
[0027] Optionally, the initial neural network model used for training is a CNN convolutional neural network.
[0028] Optionally, in step 7, the average external characteristics of each signal light are compared, and also compared with a preset threshold value, and the method for determining the fault condition of each signal light when it is working is:
[0029] Step 7.1, calculating the difference between the average external feature of each signal light and the pre-stored external feature of the initial signal light when it is working, as the first difference;
[0030] Step 7.2, comparing the first difference corresponding to each signal light with the first preset threshold value, if the first difference value is lower than the first preset threshold value, proceed to step 7.3, otherwise it is determined to be a fault state;
[0031] Step 7.3, calculating the external characteristic reference value of the signal light based on the average external characteristic corresponding to each signal light;
[0032] Step 7.4, calculating the difference between the average external characteristic of each signal lamp and the external characteristic reference value as the second difference;
[0033] Step 7.5: Compare the second difference corresponding to each signal light with the second preset threshold value. If the second difference value is lower than the second preset threshold value, it is judged as a normal working state; otherwise, it is judged as a fault state.
[0034] A signal light fault detection system, comprising:
[0035] A video data acquisition module, used to acquire video data of each traffic light target period;
[0036] A single-light video data interception module is used to determine the important area position of each signal light based on the similarity principle according to the video data, and intercept the single-light video data of the important area position of each signal light;
[0037] An image extraction module is used to extract several frames of single-light working images from the single-light video data of each signal light;
[0038] An image preprocessing module, used for preprocessing the single-lamp working image;
[0039] The feature extraction module is used to construct an external feature extraction model and extract the external features of each frame of the preprocessed single-light working image to obtain several groups of external features of each signal light;
[0040] An average external feature determination module, used for obtaining an average external feature of each signal light by taking an average value according to a plurality of groups of external features of each signal light;
[0041] The fault condition judgment module is used to compare the average external characteristics of each signal light and also compare with the preset threshold value to judge the fault condition of each signal light when it is working.
[0042] It can be seen from the above technical solutions that the present invention provides a signal light fault detection method and system, which has the following beneficial effects compared with the prior art:
[0043] The present invention combines signal light fault detection with image recognition technology. First, based on the similarity principle, the important area position of the signal light, that is, the position of the signal light, is determined. Based on the obtained signal light position, a single light working image is extracted, and an external feature extraction model is constructed. The external features of each frame of the preprocessed single light working image are extracted, which helps to improve the accuracy of fault detection.
[0044] The present invention obtains the average external feature of each signal light by taking the average value, and determines whether each signal light is in a fault state by threshold comparison, which helps to improve the stability of fault detection.
[0045] The present invention can detect the working state of a signal lamp simply, quickly and at low cost, reduce the influence of brightness difference on fault identification, improve detection accuracy, can identify fault lamps with different brightness in signal lamps, and improve signal lamp detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0047] Figure 1 It is a schematic diagram of the principle of the method of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The embodiment of the present invention discloses a signal light fault detection method, see Figure 1 , including the following steps:
[0050] Step 1: Obtain video data of each traffic light during the target period. In the specific implementation process, multiple acquisition devices may be provided, such as cameras, to acquire video data of the traffic lights when they are working.
[0051] Step 2: Determine the important area position of each traffic light based on the similarity principle according to the video data, and intercept the single light video data of the important area position of each traffic light, specifically:
[0052] Step 2.1, randomly intercepting two frames of images from the video data as the first frame of image and the second frame of image;
[0053] Step 2.2, taking the position of the traffic light as the region of interest ROI, detecting the region of interest ROI in the first frame image and the second frame image to determine at least one ROI in the first frame image and at least one ROI in the second frame image;
[0054] Step 2.3, calculating the similarity between the ROI in the first frame image and the ROI in the second frame image;
[0055] When determining whether the ROIs of two frames of images are similar, a method for calculating image similarity is usually used. Specifically, the similarity can be determined by calculating the distance or similarity between the feature vectors of the ROIs in the two frames of images.
[0056] Step 2.4, if the similarity between the ROI in the first frame image and the ROI in the second frame image is lower than a preset threshold, both the ROI in the first frame image and the ROI in the second frame image are added to the ROI to be tracked; otherwise, the ROI in the first frame image or the ROI in the second frame image is added to the ROI to be tracked, and the ROI to be tracked is the important area position of the traffic light;
[0057] Step 2.5: Track the video data based on the ROI to be tracked to obtain single-light video data of the important area position of each traffic light.
[0058] Step 3: extract several frames of single-light working images from the single-light video data of each signal light at a set time interval.
[0059] Step 4, preprocessing the single-lamp working image; the process of preprocessing the single-lamp working image includes denoising and filtering processing for the image.
[0060] In the specific implementation process, Gaussian filtering or median filtering methods can be used to denoise and filter the image, thereby improving the processing efficiency and accuracy of subsequent image feature extraction.
[0061] Step 5: construct an external feature extraction model, and extract the external features of each frame of the preprocessed single-light working image to obtain several groups of external features of each signal light; the external features at least include the brightness features and chromaticity features of the signal light.
[0062] The method to construct the external feature extraction model is:
[0063] Acquire several frames of single-lamp working images as training images;
[0064] Extracting chromaticity features: converting the training image from the RGB color model to the HSI color model, performing channel separation on the HSI color model, extracting the H component grayscale image, counting the number of pixels of each chromaticity in the H component grayscale image, and calculating the chromaticity frequency sequence as the chromaticity features of the training image;
[0065] Extracting brightness features: extracting pixel information of the training image, and determining brightness peak and valley values of the image based on the pixel information as brightness features of the training image;
[0066] The training image is used as input, and the chromaticity feature and the brightness feature are used as output to train the initial neural network model to obtain the external feature extraction model. The initial neural network is a CNN convolutional neural network suitable for image processing.
[0067] Step 6: Based on several groups of external features of each traffic light, the average external feature of each traffic light is obtained by taking the average value.
[0068] Step 7: Compare the average external characteristics of each signal light, and also compare with the preset threshold value to determine the fault condition of each signal light when it is working:
[0069] Step 7.1, calculating the difference between the average external feature of each signal light and the pre-stored external feature of the initial signal light when it is working, as the first difference;
[0070] Step 7.2, comparing the first difference corresponding to each signal light with the first preset threshold value, if the first difference value is lower than the first preset threshold value, proceed to step 7.3, otherwise it is determined to be a fault state;
[0071] Step 7.3, based on the average external features corresponding to each traffic light, calculate the external feature reference value of the traffic light by using the mean value method;
[0072] Step 7.4, calculating the difference between the average external characteristic of each signal lamp and the external characteristic reference value as the second difference;
[0073] Step 7.5: Compare the second difference corresponding to each signal light with the second preset threshold value. If the second difference value is lower than the second preset threshold value, it is judged as a normal working state; otherwise, it is judged as a fault state.
[0074] Another embodiment of the present invention further provides a signal light fault detection system, which is used to implement the method of the above embodiment, and the system includes:
[0075] A video data acquisition module, used to acquire video data of each traffic light target period;
[0076] A single-light video data interception module is used to determine the important area position of each signal light based on the similarity principle according to the video data, and intercept the single-light video data of the important area position of each signal light;
[0077] An image extraction module is used to extract several frames of single-light working images from the single-light video data of each signal light;
[0078] An image preprocessing module, used for preprocessing the single-lamp working image;
[0079] The feature extraction module is used to construct an external feature extraction model and extract the external features of each frame of the preprocessed single-light working image to obtain several groups of external features of each signal light;
[0080] An average external feature determination module, used for obtaining an average external feature of each signal light by taking an average value according to a plurality of groups of external features of each signal light;
[0081] The fault condition judgment module is used to compare the average external characteristics of each signal light and also compare with the preset threshold value to judge the fault condition of each signal light when it is working.
[0082] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system module disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0083] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A signal light fault detection method, It is characterized in that The following steps are involved: Step 1, obtaining video data of each traffic light target period; Step 2: Determine the important area position of each traffic light based on the similarity principle according to the video data, and intercept the single light video data of the important area position of each traffic light: Randomly intercepting two frames of images from the video data as a first frame of image and a second frame of image; Taking the position of the traffic light as the region of interest ROI, detecting the region of interest ROI in the first frame image and the second frame image to determine at least one ROI in the first frame image and at least one ROI in the second frame image; Calculate the similarity between the ROI in the first frame image and the ROI in the second frame image; If the similarity between the ROI in the first frame image and the ROI in the second frame image is lower than a preset threshold, both the ROI in the first frame image and the ROI in the second frame image are added to the ROI to be tracked; otherwise, the ROI in the first frame image or the ROI in the second frame image is added to the ROI to be tracked, and the ROI to be tracked is the important area position of the traffic light; Tracking the video data based on the ROI to be tracked to obtain single-light video data of the important area position of each traffic light; Step 3, extracting a plurality of frames of single-light working images from the single-light video data of each signal light; Step 4, preprocessing the single-lamp working image; Step 5: construct an external feature extraction model, and extract the external features of each frame of the preprocessed single-light working image to obtain several groups of external features of each signal light; Step 6: According to several groups of external features of each traffic light, the average external feature of each traffic light is obtained by taking the average value; Step 7: Compare the average external characteristics of each signal light, and also compare with the preset threshold value to determine the fault condition of each signal light when it is working: Step 7.1, calculating the difference between the average external feature of each signal light and the pre-stored external feature of the initial signal light when it is working, as the first difference; Step 7.2, comparing the first difference corresponding to each signal light with the first preset threshold value, if the first difference value is lower than the first preset threshold value, proceed to step 7.3, otherwise it is determined to be a fault state; Step 7.3, calculating the external characteristic reference value of the signal light based on the average external characteristic corresponding to each signal light; Step 7.4, calculating the difference between the average external characteristic of each signal lamp and the external characteristic reference value as the second difference; Step 7.5: Compare the second difference corresponding to each signal light with the second preset threshold value. If the second difference value is lower than the second preset threshold value, it is judged as a normal working state; otherwise, it is judged as a fault state.
2. A signal light fault detection method according to claim 1, It is characterized in that In step 4, the process of preprocessing the single-lamp working image includes denoising and filtering processing for the image.
3. A signal light fault detection method according to claim 1, It is characterized in that In step 5, the external features include at least brightness features and chromaticity features of the signal light.
4. A signal light fault detection method according to claim 3, It is characterized in that In step 5, the method for constructing the external feature extraction model is: Acquire several frames of single-lamp working images as training images; Extracting chromaticity features: converting the training image from the RGB color model to the HSI color model, performing channel separation on the HSI color model, extracting the H component grayscale image, counting the number of pixels of each chromaticity in the H component grayscale image, and calculating the chromaticity frequency sequence as the chromaticity features of the training image; Extracting brightness features: extracting pixel information of the training image, and determining brightness peak and valley values of the image based on the pixel information as brightness features of the training image; Taking the training image as input and the chromaticity feature and the brightness feature as output, an initial neural network model is trained to obtain an external feature extraction model.
5. A signal light fault detection method according to claim 4, It is characterized in that The initial neural network model used for training is the CNN convolutional neural network.
6. A signal light fault detection system, It is characterized in that include: A video data acquisition module, used to acquire video data of each traffic light target period; The single-light video data interception module is used to determine the important area position of each traffic light based on the similarity principle according to the video data, and intercept the single-light video data of the important area position of each traffic light: Randomly intercepting two frames of images from the video data as a first frame of image and a second frame of image; Taking the position of the traffic light as the region of interest ROI, detecting the region of interest ROI in the first frame image and the second frame image to determine at least one ROI in the first frame image and at least one ROI in the second frame image; Calculate the similarity between the ROI in the first frame image and the ROI in the second frame image; If the similarity between the ROI in the first frame image and the ROI in the second frame image is lower than a preset threshold, both the ROI in the first frame image and the ROI in the second frame image are added to the ROI to be tracked; otherwise, the ROI in the first frame image or the ROI in the second frame image is added to the ROI to be tracked, and the ROI to be tracked is the important area position of the traffic light; Tracking the video data based on the ROI to be tracked to obtain single-light video data of the important area position of each traffic light; An image extraction module is used to extract several frames of single-light working images from the single-light video data of each signal light; An image preprocessing module, used for preprocessing the single-lamp working image; The feature extraction module is used to construct an external feature extraction model and extract the external features of each frame of the preprocessed single-light working image to obtain several groups of external features of each signal light; An average external feature determination module, used for obtaining an average external feature of each signal light by taking an average value according to a plurality of groups of external features of each signal light; The fault condition judgment module is used to compare the average external characteristics of each signal light and also compare with the preset threshold to judge the fault condition of each signal light when it is working: Step 7.1, calculating the difference between the average external feature of each signal light and the pre-stored external feature of the initial signal light when it is working, as the first difference; Step 7.2, comparing the first difference corresponding to each signal light with the first preset threshold value, if the first difference value is lower than the first preset threshold value, proceed to step 7.3, otherwise it is determined to be a fault state; Step 7.3, calculating the external characteristic reference value of the signal light based on the average external characteristic corresponding to each signal light; Step 7.4, calculating the difference between the average external characteristic of each signal lamp and the external characteristic reference value as the second difference; Step 7.5: Compare the second difference corresponding to each signal light with the second preset threshold value. If the second difference value is lower than the second preset threshold value, it is judged as a normal working state; otherwise, it is judged as a fault state.
