CN111126150A - Real-time identification method for on and off states of indicator lamp - Google Patents
Real-time identification method for on and off states of indicator lamp Download PDFInfo
- Publication number
- CN111126150A CN111126150A CN201911164751.6A CN201911164751A CN111126150A CN 111126150 A CN111126150 A CN 111126150A CN 201911164751 A CN201911164751 A CN 201911164751A CN 111126150 A CN111126150 A CN 111126150A
- Authority
- CN
- China
- Prior art keywords
- identification area
- indicator light
- state
- area
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a real-time identification method for the on and off states of an indicator light, which is carried out according to the following steps: step one, marking an identification area of an indicator light; step two, determining a preset value of the state of the indicator light; extracting an image corresponding to the identification area of the indicator light; step four, adjusting the brightness value of the image corresponding to the identification area of each indicator light; and fifthly, judging the state of the indicator light in real time. According to the method, the influence of the size and the shape of the indicator light on the identification result can be better solved by defining the identification area; according to the method, the brightness value of the auxiliary identification area is adjusted according to the brightness value of the auxiliary identification area obtained when the preset value of the state of the indicator lamp is determined, then the on-off state of the indicator lamp is judged in real time, and the influence of the brightness of the indicator lamp and the brightness of the surrounding environment on the identification result can be well solved.
Description
Technical Field
The invention belongs to the field of image recognition, relates to an indicator light, and particularly relates to a real-time identification method for the on and off states of the indicator light.
Background
In the fields of current electric power, railway, petroleum, digital machine rooms and the like, a lot of old or special equipment still cannot perform online state monitoring in the form of network and the like, and the running state of the equipment can be obtained only in the mode of viewing the indicator lamp on site. Taking a power distribution cabinet commonly used in the power field as an example, the power distribution cabinet is not only used in occasions with more monitoring means such as a machine room, but also frequently used in occasions with dispersed loads and less loops, such as underground parking lots, elevator rooms, corridors and the like of schools, factories and residential quarters. With the rapid development of the internet of things technology, the remote transmission of the device state can be well realized through wired or wireless transmission technologies such as RS485, Ethernet, ZigBee, WiFi, NB-IoT and LoRa. Therefore, the key for acquiring the running state of the old or special equipment is to timely and accurately identify the state of the indicator light, and then a proper transmission means can be selected according to the actual situation to finish the remote transmission of the running state of the equipment.
And because the state of the indicator light comprises various states such as normally on, normally off, flashing and the like, the key for timely and accurately identifying the state of the indicator light is as follows: the on and off states of the indicator lamp at the moment can be judged in real time. Then, relevant technicians can perform real-time recognition and statistical analysis on the on and off states of the indicator lamp for many times according to actual requirements of different application scenes, so that the state of the indicator lamp is obtained.
At present, in the status identification of the indicator lights of old/special equipment and other various application scenes needing to identify the status of the indicator lights, the methods for identifying the on and off status of the indicator lights in real time mainly comprise three types:
firstly, local transformation is carried out on a state presenting part of the equipment, for example, a power supply line of an indicator lamp is led out, and the on and off states of the indicator lamp are obtained by monitoring the voltage of the power supply line; however, the method is only suitable for some equipment which is convenient for leading out the power supply cable, and is not suitable for some precise equipment.
Secondly, performing secondary development by using a software development kit provided by the equipment to acquire state information from a source; however, many old devices do not support secondary development, and the method needs secondary development on devices of different models respectively, and the workload is huge.
And thirdly, the on-off states of the indicator lights are identified in real time by utilizing an image identification technology, the method does not need to transform and upgrade the existing equipment, has good expandability, and can indirectly obtain the equipment state information through an external camera for different equipment. At present, many research achievements utilize deep learning technology to identify the on and off states of the indicator light in real time, and the key of the method is as follows: a large number of samples are needed for model training, and it is very difficult to obtain samples of old or special equipment in different industry fields in the actual model training process; in addition, the algorithm complexity of the method is high, and the requirements on the hardware performance of the front-end image acquisition and identification equipment are also high; finally, the method is still susceptible to factors such as the size, shape, brightness, color and ambient brightness of the indicator light during the identification process, thereby causing false alarm or false negative alarm.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a real-time identification method for the on and off states of an indicator light, and solve the technical problem that the on and off states of the indicator light are easy to be mistakenly reported or missed in the prior art.
In order to solve the technical problems, the invention adopts the following technical scheme:
a real-time identification method for on and off states of an indicator light is characterized in that the indicator light state capable of being identified in real time is divided into an on state and an off state, the indicator light state different from the on state is the off state, and the indicator light state different from the off state is the on state, and the method is carried out according to the following steps:
step one, marking an identification area of an indicator light;
step two, determining a preset value of the state of the indicator light;
extracting an image corresponding to the identification area of the indicator light;
step four, adjusting the brightness value of the image corresponding to the identification area of each indicator light;
and fifthly, judging the state of the indicator light in real time.
The method is specifically carried out according to the following steps:
step one, marking an identification area of an indicator lamp:
the camera is arranged at a position capable of completely acquiring the area where the indicating lamp is located, the relative positions of the camera and the indicating lamp are fixed, and the corresponding indicating lamp identification areas are respectively defined according to the position of each indicating lamp in the area where the indicating lamp is located in a single-frame image acquired by the camera;
the indicating lamp identification area comprises a core identification area and an auxiliary identification area, the core identification area and the auxiliary identification area are both closed graphs, and the core identification area is completely surrounded by the auxiliary identification area;
the core identification area of each indicator light is not coincident with the core identification area and the auxiliary identification area of any other indicator light;
step two, determining a preset value of the state of the indicator light:
step 201: for any ith indicator lamp in the area where the indicator lamp is located, obtaining the average brightness value LA of the core identification area of the ith indicator lampi_0And average color value CA, and average brightness value LB of ith indicating lamp auxiliary identification area is obtainedi_0And an average color value CB; the color representation forms of the average color value CA and the average color value CB are RGB;
step 202: converting the color representation form of RGB for CA into the color representation form of HSB; the conversion formula for the brightness level in HSB is: brightness degree RGB maximum color component value/255 × 100% "; the brightness degree in the color representation form of the HSB is recorded as a;
step 203: converting the color representation form of the CB from RGB into the color representation form of the HSB; the conversion formula for the brightness level in HSB is: brightness degree RGB maximum color component value/255 × 100% "; the brightness degree in the color representation form of the HSB is recorded as b, and a coefficient theta is set as a-b;
step 204: recording and storing a corresponding preset value of the ith indicator light, wherein the preset value is LAi_0、LBi_0θ and LAi_0And LBi_0The state of the indicator light corresponding to the moment; the state of the indicator light is a bright state or a dead state;
step three, extracting an image corresponding to the identification area of the indicator light:
video acquisition is carried out on the area where the indicator lamp is located by adopting a camera, and a single-frame image acquired in real time is obtained; according to the demarcated identification area, extracting an image corresponding to the identification area of the indicator light from a single-frame image acquired in real time;
step four, adjusting the brightness value of the image corresponding to the identification area of each indicator light:
step 401: acquiring a real-time average brightness value LA of the identification area of the core of the ith indicator lamp according to the image corresponding to the identification area of any ith indicator lampiReal-time average brightness value LB of auxiliary identification areai;
Step 402: if LBi≠LBi_0If yes, go to step 403, otherwise go to step 407;
step 403: adjusting the brightness of the image corresponding to the identification area of the ith indicator lamp, and acquiring the average brightness value LA 'of the core identification area in the image after brightness adjustment'iAnd auxiliary recognition area average brightness value LB'i;
Step 404: if LB'i≠LBi_0If yes, step 403 is executed again, otherwise step 405 is executed;
step 405: make LA'i=(LA′i-LAi)*θ+LA′i;
step 407: make LA'i=LAiAnd LB'i=LBi;
Step 408: recognizing the end of the adjustment of the brightness value of the area, and storing the adjusted LA 'of the ith indicator lamp'iAnd LB'i;
Step five, judging the state of the indicator light in real time;
step 501: obtaining LA 'of the ith indicator lamp with adjusted brightness value of the identification area'iAnd LB'iAnd the coefficient omega is 1+ (255-LA)i_0)/255;
Step 502: if satisfy | LA'i-LAi_0|≤24+22If the condition is (1+ ω), the real-time state of the ith indicator light is the same as the state of the indicator light in the preset value, and the process of judging the state of the indicator light in real time is finished, otherwise, the step 503 is executed;
step 503: if satisfy | LA'i-LAi_0|≥25+23If the condition is (1+ ω), the real-time state of the ith indicator light is a state different from the state of the indicator light in the preset value, and the process of judging the state of the indicator light in real time is finished, otherwise, the step 504 is executed;
step 504: sharpening the image corresponding to the identification area of the ith indicator light with the adjusted brightness value of the identification area, and re-obtaining the average brightness value LA' of the core identification area after sharpeningiAnd the average brightness value LB' of the auxiliary recognition areai;
Step 505: if satisfy | | | Ai-LB″i|-|LAi_0-LBi_0||≤24+22(1+ ω), the real-time state of the ith indicator light is the same as the state of the indicator light in the preset value; otherwise, the real-time state of the ith indicator lamp is a state different from the state of the indicator lamp in the preset value.
The invention also has the following technical characteristics:
the method for acquiring the average brightness value and the average color value is carried out according to a sixth step, and the sixth step is carried out according to the following steps:
step 601: acquiring the brightness value and the color value of each pixel in the core identification area and the auxiliary identification area;
step 602: calculating to obtain the average brightness value of the auxiliary identification area;
step 603: calculating to obtain average color value (R ') of auxiliary identification area'0,G′0,B′0);
Step 604: setting a core identification area to have N pixels to form a set S, and taking j as 1;
step 605: taking the jth pixel in S, if the brightness value L of the jth pixeljSatisfy Lj<25If yes, go to step 607, otherwise go to step 606;
step 606: if the color value (R) of the jth pixel in the kernel identification fieldj,Gj,Bj) And simultaneously satisfies the following conditions:
Step 607 is executed, otherwise step 608 is executed;
step 607: cleaning the jth pixel, namely removing the jth pixel from the set S;
step 608: if j is equal to j +1, if j is equal to or less than N, go to step 605, otherwise go to step 609;
step 609: and calculating to obtain the average brightness value and the average color value of the core identification area according to the brightness values and the color values of all pixels in the set S after the cleaning operation is completed.
The range of the brightness value is 0-255; the average color value range is 0-255.
When θ is 0, it means that the sensitivity of the core identification region and the auxiliary identification region to the brightness of the surrounding environment is substantially the same; when theta is greater than 0, the core identification area is more sensitive to the brightness of the surrounding environment than the auxiliary identification area; when θ <0, it means that the auxiliary recognition area is more sensitive to the brightness of the surrounding environment than the core recognition area.
In step 504, a linear spatial filtering method is used to sharpen the image corresponding to the identification area of the ith indicator light whose identification area brightness value has been adjusted.
Compared with the prior art, the invention has the following technical effects:
the method can better solve the influence of the size and the shape of the indicator light on the identification result by a mode of delimiting the identification area; according to the method, the brightness value of the auxiliary identification area is adjusted according to the brightness value of the auxiliary identification area obtained when the preset value of the state of the indicator lamp is determined, then the on-off state of the indicator lamp is judged in real time, and the influence of the brightness of the indicator lamp and the brightness of the surrounding environment on the identification result can be well solved.
(II) due to the requirement of public safety, monitoring cameras are already deployed in a plurality of application scene areas needing to identify the states of the indicator lights, so that equipment state information can be indirectly obtained by identifying the states of the indicator lights only by improving the existing monitoring software and enabling the monitoring software to support the method of the invention, and the method has good and wide practical application value.
(III) the method is suitable for old/special equipment which cannot be monitored in an online state and other various application scenes which need to identify the state of the indicator light; the method has low algorithm complexity and has low requirements on the hardware performance of equipment for front-end image acquisition and identification.
Drawings
Fig. 1 is an effect diagram of the indicating lamp state being in a bright state in the situation that the fluorescent lamp is turned on indoors, wherein the indicating lamp of the power distribution cabinet is subjected to identification region division and the preset value of the indicating lamp state is determined.
Fig. 2 is a diagram of the recognition result of the indicator light of the power distribution cabinet in an environment where the fluorescent lamp is turned on indoors.
Fig. 3 is a graph of the recognition result of a switch board indicator light in a flashlight interference situation in an indoor environment with a fluorescent lamp turned on.
Fig. 4 is an effect diagram of the indication lamp state being off state in the preset value of the indication lamp state determined by the identification area division of the indication lamp of the power distribution cabinet in the environment of turning off the fluorescent lamp indoors.
Fig. 5 is a diagram showing the recognition result of the indicator light of the power distribution cabinet in an environment where the fluorescent lamp is turned off indoors.
Fig. 6 is a graph of the recognition result of the switch board indicator light in the environment of switching off the fluorescent lamp indoors under the interference of switching on the fluorescent lamp and the flashlight.
The present invention will be explained in further detail with reference to examples.
Detailed Description
The method includes the steps that a camera is used for conducting video collection on an area where an indicator lamp is located, the area where the indicator lamp is located is divided into a core identification area and an auxiliary identification area, and the state of the indicator lamp at a certain moment, the average brightness value and the average color value of the core identification area of the indicator lamp at the moment, the average brightness value and the average color value of the auxiliary identification area of the indicator lamp at the moment and other numerical values are recorded in a mode of determining a preset value of the state of the indicator lamp; and then, acquiring an image of the area where the indicator lamp is located in real time, analyzing the current brightness value of the auxiliary identification area, adjusting the brightness of the image of the area where the indicator lamp is located, comparing the adjusted brightness value of the core area of the indicator lamp with the brightness value of the core identification area acquired when the preset value of the state of the indicator lamp is determined, and finally judging the on-off state of the indicator lamp in real time. The method can better solve the influence of the size, shape, color and brightness of the indicator light and the brightness of the surrounding environment on the identification result.
In the invention, the color representation form of RGB is a color representation form of 'red/green/blue'; the color representation form of the HSB is a color representation form of 'hue/saturation/brightness'.
The present invention is not limited to the following embodiments, and all equivalent changes based on the technical solutions of the present invention fall within the protection scope of the present invention.
Example (b):
the embodiment provides a real-time identification method for on and off states of an indicator light, wherein the indicator light states capable of being identified in real time are divided into an on state and an off state, the indicator light state different from the on state is the off state, and the indicator light state different from the off state is the on state, and the method specifically comprises the following steps:
step one, marking an identification area of an indicator lamp:
the camera is arranged at a position capable of completely acquiring the area where the indicating lamp is located, the relative positions of the camera and the indicating lamp are fixed, and the corresponding indicating lamp identification areas are respectively defined according to the position of each indicating lamp in the area where the indicating lamp is located in a single-frame image acquired by the camera;
the indicating lamp identification area comprises a core identification area and an auxiliary identification area, the core identification area and the auxiliary identification area are both closed graphs, and the core identification area is completely surrounded by the auxiliary identification area; namely, the identification area of the indicator light consists of a small closed graph and a large closed graph, and the area covered by the small closed graph is completely contained in the area covered by the large closed graph; the area covered by the small closed graph is a core identification area; the residual area of the area covered by the large closed graph after the area covered by the small closed graph is removed is an auxiliary identification area;
the core identification area of each indicator light is not coincident with the core identification area and the auxiliary identification area of any other indicator light;
step two, determining a preset value of the state of the indicator light:
step 201: for any ith indicator lamp in the area where the indicator lamp is located, obtaining the average brightness value LA of the core identification area of the ith indicator lampi_0And average color value CA, and average brightness value LB of ith indicating lamp auxiliary identification area is obtainedi_0And an average color value CB; the color representation forms of the average color value CA and the average color value CB are RGB;
the range of the brightness value is 0-255; the average color value range is 0-255.
Step 202: converting the color representation form of RGB for CA into the color representation form of HSB; the conversion formula for the brightness level in HSB is: brightness degree RGB maximum color component value/255 × 100% "; the brightness degree in the color representation form of the HSB is recorded as a;
step 203: converting the color representation form of the CB from RGB into the color representation form of the HSB; the conversion formula for the brightness level in HSB is: brightness degree RGB maximum color component value/255 × 100% "; the brightness degree in the color representation form of the HSB is recorded as b, and a coefficient theta is set as a-b;
when θ is 0, it means that the sensitivity of the core identification region and the auxiliary identification region to the brightness of the surrounding environment is substantially the same; when theta is greater than 0, the core identification area is more sensitive to the brightness of the surrounding environment than the auxiliary identification area; when θ <0, it means that the auxiliary recognition area is more sensitive to the brightness of the surrounding environment than the core recognition area.
Step 204: recording and storing a corresponding preset value of the ith indicator light, wherein the preset value is LAi_0、LBi_0θ and LAi_0And LBi_0The state of the indicator light corresponding to the moment; the state of the indicator light is a bright state or a dead state;
step three, extracting an image corresponding to the identification area of the indicator light:
video acquisition is carried out on the area where the indicator lamp is located by adopting a camera, and a single-frame image acquired in real time is obtained; according to the demarcated identification area, extracting an image corresponding to the identification area of the indicator light from a single-frame image acquired in real time;
step four, adjusting the brightness value of the image corresponding to the identification area of each indicator light:
step 401: acquiring a real-time average brightness value LA of the identification area of the core of the ith indicator lamp according to the image corresponding to the identification area of any ith indicator lampiReal-time average brightness value LB of auxiliary identification areai;
Step 402: if LBi≠LBi_0If yes, go to step 403, otherwise go to step 407;
step 403: adjusting the brightness of the image corresponding to the identification area of the ith indicator lamp, and acquiring the average brightness value LA 'of the core identification area in the image after brightness adjustment'iAnd auxiliary recognition area average brightness value LB'i;
Step 404: if LB'i≠LBi_0If yes, step 403 is executed again, otherwise step 405 is executed;
step 405: make LA'i=(LA′i-LAi)*θ+LA′i;
step 407: make LA'i=LAiAnd LB'i=LBi;
Step 408: recognizing the end of the adjustment of the brightness value of the area, and storing the adjusted LA 'of the ith indicator lamp'iAnd LB'i;
Step five, judging the state of the indicator light in real time;
step 501: obtaining LA 'of the ith indicator lamp with adjusted brightness value of the identification area'iAnd LB'iAnd the coefficient omega is 1+ (255-LA)i_0)/255;
Step 502: if satisfy | LA'i-LAi_0|≤24+22If the condition is (1+ ω), the real-time state of the ith indicator light is the same as the state of the indicator light in the preset value, and the process of judging the state of the indicator light in real time is finished, otherwise, the step 503 is executed;
step 503: if satisfy | LA'i-LAi_0|≥25+23If the condition is (1+ ω), the real-time state of the ith indicator light is a state different from the state of the indicator light in the preset value, and the process of judging the state of the indicator light in real time is finished, otherwise, the step 504 is executed;
step 504: sharpening the image corresponding to the identification area of the ith indicator light with the adjusted brightness value of the identification area, and re-obtaining the average brightness value LA' of the core identification area after sharpeningiAnd the average brightness value LB' of the auxiliary recognition areai;
Step 505: if satisfy | | LAi-LB″i|-|LAi_0-LBi_0|≤24+22(1+ ω), the real-time state of the ith indicator light is the same as the state of the indicator light in the preset value; otherwise, the real-time state of the ith indicator lamp is a state different from the state of the indicator lamp in the preset value.
Specifically, the method for obtaining the average brightness value and the average color value is performed according to a sixth step, where the sixth step is performed according to the following steps:
step 601: acquiring the brightness value and the color value of each pixel in the core identification area and the auxiliary identification area;
step 602: calculating to obtain the average brightness value of the auxiliary identification area;
step 603: calculating to obtain average color value (R ') of auxiliary identification area'0G′0,B′0);
Step 604: setting a core identification area to have N pixels to form a set S, and taking j as 1;
step 605: taking the jth pixel in S, if the brightness value L of the jth pixeljSatisfy Lj<25If yes, go to step 607, otherwise go to step 606;
step 606: if the color value (R) of the jth pixel in the kernel identification fieldj,Gj,Bj) And simultaneously satisfies the following conditions:
Step 607 is executed, otherwise step 608 is executed;
step 607: cleaning the jth pixel, namely removing the jth pixel from the set S;
step 608: if j is equal to j +1, if j is equal to or less than N, go to step 605, otherwise go to step 609;
step 609: and calculating to obtain the average brightness value and the average color value of the core identification area according to the brightness values and the color values of all pixels in the set S after the cleaning operation is completed.
The experimental effect is verified:
the effect of identifying the status of the indicator lamp according to the present invention is described below through experiments.
In the experiment, a common high-definition camera (with the resolution of 1920 × 1080) on the market is utilized, and the method is added by improving the monitoring software, so that the monitoring software supports the method. In an indoor environment with dark natural light, the state of an indicator lamp on a power distribution cabinet is judged; after the preset value of the state of the indicator lamp is determined, if the state of the indicator lamp is not changed, no prompt is given in a display interface; if the state of the indicator lamp changes, the indicator lamp with the on state in the preset value of the state of the indicator lamp prompts 'off' in the display interface, and the indicator lamp with the off state in the preset value of the state of the indicator lamp prompts 'on' in the display interface. Furthermore, for each identified indicator light, at the lower right of the identification area, there are three rows of numbers, whose specific meanings are: 2 numbers in the top row respectively represent the brightness of the core identification area and the red value of the core area; the middle row is provided with 3 numbers which respectively represent the brightness of the auxiliary identification area and the green value and the blue value of the core area; the bottom row, 1 number, represents the effective pixel proportion for calculating the brightness of the core identification area, for example a core area size of 100x100, which is 0.75, meaning that only 7500 pixels are involved in the operation and the remaining 2500 pixels are washed out according to the method of claim 9.
Experiment 1: in the environment of switching on fluorescent lamps indoors
In an environment where a fluorescent lamp is turned on indoors, the test procedure includes three steps:
firstly, according to the method of the invention, the identification area of the second indicator lamp in the first row from left to right and the fourth indicator lamp in the second row from left to right are defined, and the state of the indicator lamp in the preset values of the states of the indicator lamps is determined to be the on state according to the on and off states of the indicator lamps at the moment, as shown in figure 1; thereafter, if their states do not change, no prompt is made in the display interface.
Then, the state of the second indicator light in the first row from left to right and the state of the fourth indicator light in the second row from left to right are changed, and the recognition result is shown in fig. 2.
Finally, in order to increase the identification difficulty, the flashlight is used for irradiating the identification area, and the identification result is shown in fig. 3.
Experiment 2: in the environment of switching off fluorescent lamp indoors
In an environment where the fluorescent lamp is turned off indoors, the test process also includes three steps:
firstly, according to the method of the invention, the identification area of the second indicator lamp in the first row from left to right and the fourth indicator lamp in the second row from left to right are defined, and the status of the indicator lamp in the preset values of the status of the indicator lamps is determined to be the off status according to the on and off status of the indicator lamps at the moment, as shown in fig. 4; thereafter, if their states do not change, no prompt is made in the display interface.
Then, the state of the second indicator light in the first row from left to right and the state of the fourth indicator light in the second row from left to right are changed, and the recognition result is shown in fig. 5.
Finally, in order to increase the identification difficulty, the 2 indicator lamps are turned off again, the fluorescent lamp is turned on, the flashlight is used for irradiating the identification area, and the identification result is shown in fig. 6.
Claims (6)
1. A real-time identification method for on and off states of an indicator light is characterized in that the indicator light states capable of being identified in real time are divided into an on state and an off state, the indicator light state different from the on state is the off state, and the indicator light state different from the off state is the on state, and the method is carried out according to the following steps:
step one, marking an identification area of an indicator light;
step two, determining a preset value of the state of the indicator light;
extracting an image corresponding to the identification area of the indicator light;
step four, adjusting the brightness value of the image corresponding to the identification area of each indicator light;
and fifthly, judging the state of the indicator light in real time.
2. The method for real-time identification of the on and off states of the indicator light according to claim 1, characterized in that the method specifically comprises the following steps:
step one, marking an identification area of an indicator lamp:
the camera is arranged at a position capable of completely acquiring the area where the indicating lamp is located, the relative positions of the camera and the indicating lamp are fixed, and the corresponding indicating lamp identification areas are respectively defined according to the position of each indicating lamp in the area where the indicating lamp is located in a single-frame image acquired by the camera;
the indicating lamp identification area comprises a core identification area and an auxiliary identification area, the core identification area and the auxiliary identification area are both closed graphs, and the core identification area is completely surrounded by the auxiliary identification area;
the core identification area of each indicator light is not coincident with the core identification area and the auxiliary identification area of any other indicator light;
step two, determining a preset value of the state of the indicator light:
step 201: for any ith indicator lamp in the area where the indicator lamp is located, obtaining the average brightness value LA of the core identification area of the ith indicator lampi_0And average color value CA, and average brightness value LB of ith indicating lamp auxiliary identification area is obtainedi_0And an average color value CB; the color representation forms of the average color value CA and the average color value CB are RGB;
step 202: converting the color representation form of RGB for CA into the color representation form of HSB; the conversion formula for the brightness level in HSB is: brightness degree RGB maximum color component value/255 × 100% "; the brightness degree in the color representation form of the HSB is recorded as a;
step 203: converting the color representation form of the CB from RGB into the color representation form of the HSB; the conversion formula for the brightness level in HSB is: brightness degree RGB maximum color component value/255 × 100% "; the brightness degree in the color representation form of the HSB is recorded as b, and a coefficient theta is set as a-b;
step 204: recording and storing a corresponding preset value of the ith indicator light, wherein the preset value is LAi_0、LBi_0θ and LAi_0And LBi_0The state of the indicator light corresponding to the moment; the state of the indicator light is a bright state or a dead state;
step three, extracting an image corresponding to the identification area of the indicator light:
video acquisition is carried out on the area where the indicator lamp is located by adopting a camera, and a single-frame image acquired in real time is obtained; according to the demarcated identification area, extracting an image corresponding to the identification area of the indicator light from a single-frame image acquired in real time;
step four, adjusting the brightness value of the image corresponding to the identification area of each indicator light:
step 401: acquiring a real-time average brightness value LA of the identification area of the core of the ith indicator lamp according to the image corresponding to the identification area of any ith indicator lampiReal-time average brightness value LB of auxiliary identification areai;
Step 402: if LBi≠LBi_0If yes, go to step 403, otherwise go to step 407;
step 403: adjusting the brightness of the image corresponding to the identification area of the ith indicator lamp, and acquiring the average brightness value LA 'of the core identification area in the image after brightness adjustment'iAnd auxiliary recognition area average brightness value LB'i;
Step 404: if LB'i≠LBi_0If yes, step 403 is executed again, otherwise step 405 is executed;
step 405: make LA'i=(LA′i-LAi)*θ+LA′i;
step 407: make LA'i=LAiAnd LB'i=LBi;
Step 408: recognizing the end of the adjustment of the brightness value of the area, and storing the adjusted LA 'of the ith indicator lamp'iAnd LB'i;
Step five, judging the state of the indicator light in real time;
step 501: obtaining LA 'of the ith indicator lamp with adjusted brightness value of the identification area'iAnd LB'iAnd the coefficient omega is 1+ (255-LA)i_0)/255;
Step 502: if satisfy | LA'i-LAi_0|≤24+22If the condition is (1+ ω), the real-time state of the ith indicator light is the same as the state of the indicator light in the preset value, and the process of judging the state of the indicator light in real time is finished, otherwise, the step 503 is executed;
step 503: if satisfy | LA'i-LAi_0|≥25+23If the condition is (1+ ω), the real-time state of the ith indicator light is a state different from the state of the indicator light in the preset value, and the process of judging the state of the indicator light in real time is finished, otherwise, the step 504 is executed;
step 504: sharpening the image corresponding to the identification area of the ith indicator light with the adjusted brightness value of the identification area, and re-obtaining the average brightness value LA' of the core identification area after sharpeningiAnd the average brightness value LB' of the auxiliary recognition areai;
Step 505: if satisfy | | LAi-LB″i|-|LAi_0-LBi_0||≤24+22(1+ ω), the real-time state of the ith indicator light is the same as the state of the indicator light in the preset value; otherwise, the real-time state of the ith indicator lamp is a state different from the state of the indicator lamp in the preset value.
3. The method for real-time identification of the on-off state of the indicator light according to claim 2, wherein the method for obtaining the average brightness value and the average color value is performed according to a sixth step, and the sixth step is performed according to the following steps:
step 601: acquiring the brightness value and the color value of each pixel in the core identification area and the auxiliary identification area;
step 602: calculating to obtain the average brightness value of the auxiliary identification area;
step 603: calculating to obtain average color value (R ') of auxiliary identification area'0,G′0,B′0);
Step 604: setting a core identification area to have N pixels to form a set S, and taking j as 1;
step 605: taking the jth pixel in S, if the brightness value L of the jth pixeljSatisfy Lj<25If yes, go to step 607, otherwise go to step 606;
step 606: if the color value (R) of the jth pixel in the kernel identification fieldj,Gj,Bj) And simultaneously satisfies the following conditions:
Step 607 is executed, otherwise step 608 is executed;
step 607: cleaning the jth pixel, namely removing the jth pixel from the set S;
step 608: if j is equal to j +1, if j is equal to or less than N, go to step 605, otherwise go to step 609;
step 609: and calculating to obtain the average brightness value and the average color value of the core identification area according to the brightness values and the color values of all pixels in the set S after the cleaning operation is completed.
4. The real-time identification method for the on and off states of the indicator light according to claim 2, characterized in that the range of the brightness value is 0 to 255; the average color value range is 0-255.
5. The method for real-time recognition of on-off status of an indicator light as claimed in claim 2, wherein when θ is 0, it means that the sensitivity of the core recognition area and the auxiliary recognition area to the brightness of the surrounding environment is substantially the same; when theta is greater than 0, the core identification area is more sensitive to the brightness of the surrounding environment than the auxiliary identification area; when θ <0, it means that the auxiliary recognition area is more sensitive to the brightness of the surrounding environment than the core recognition area.
6. The method for real-time identification of on-off status of indicator lights according to claim 2, wherein in step 504, the image corresponding to the identification area of the ith indicator light whose identification area brightness value is adjusted is sharpened by linear spatial filtering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911164751.6A CN111126150B (en) | 2019-11-25 | 2019-11-25 | Real-time identification method for on-off state of indicator lamp |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911164751.6A CN111126150B (en) | 2019-11-25 | 2019-11-25 | Real-time identification method for on-off state of indicator lamp |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111126150A true CN111126150A (en) | 2020-05-08 |
CN111126150B CN111126150B (en) | 2023-06-09 |
Family
ID=70496583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911164751.6A Active CN111126150B (en) | 2019-11-25 | 2019-11-25 | Real-time identification method for on-off state of indicator lamp |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111126150B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103488987A (en) * | 2013-10-15 | 2014-01-01 | 浙江宇视科技有限公司 | Video-based method and device for detecting traffic lights |
CN104897367A (en) * | 2015-04-28 | 2015-09-09 | 南车株洲电力机车研究所有限公司 | Indicating light optical state automatic test method and system |
KR20160148850A (en) * | 2015-06-17 | 2016-12-27 | 한밭대학교 산학협력단 | Method for detecting and recognizing traffic lights signal based on features |
CN107103330A (en) * | 2017-03-31 | 2017-08-29 | 深圳市浩远智能科技有限公司 | A kind of LED status recognition methods and device |
CN107392116A (en) * | 2017-06-30 | 2017-11-24 | 广州广电物业管理有限公司 | A kind of indicator lamp recognition methods and system |
CN108805145A (en) * | 2018-06-01 | 2018-11-13 | 中铁局集团有限公司 | A kind of subway work railcar signal lamp and ambient brightness detecting device |
CN109308447A (en) * | 2018-07-29 | 2019-02-05 | 国网上海市电力公司 | The method of equipment operating parameter and operating status is automatically extracted in remote monitoriong of electric power |
CN110020645A (en) * | 2019-02-11 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of image processing method and device, a kind of calculating equipment and storage medium |
-
2019
- 2019-11-25 CN CN201911164751.6A patent/CN111126150B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103488987A (en) * | 2013-10-15 | 2014-01-01 | 浙江宇视科技有限公司 | Video-based method and device for detecting traffic lights |
CN104897367A (en) * | 2015-04-28 | 2015-09-09 | 南车株洲电力机车研究所有限公司 | Indicating light optical state automatic test method and system |
KR20160148850A (en) * | 2015-06-17 | 2016-12-27 | 한밭대학교 산학협력단 | Method for detecting and recognizing traffic lights signal based on features |
CN107103330A (en) * | 2017-03-31 | 2017-08-29 | 深圳市浩远智能科技有限公司 | A kind of LED status recognition methods and device |
CN107392116A (en) * | 2017-06-30 | 2017-11-24 | 广州广电物业管理有限公司 | A kind of indicator lamp recognition methods and system |
CN108805145A (en) * | 2018-06-01 | 2018-11-13 | 中铁局集团有限公司 | A kind of subway work railcar signal lamp and ambient brightness detecting device |
CN109308447A (en) * | 2018-07-29 | 2019-02-05 | 国网上海市电力公司 | The method of equipment operating parameter and operating status is automatically extracted in remote monitoriong of electric power |
CN110020645A (en) * | 2019-02-11 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of image processing method and device, a kind of calculating equipment and storage medium |
Non-Patent Citations (5)
Title |
---|
BULLOUGH JOHN D. ET AL.: "Indirect Detection of Visual Signals for Emergency Notification" * |
姜永奎: "基于视频图像的指示灯检测辅助值班系统" * |
朱永珍等: "基于HSV色彩空间与形状特征的交通灯自动识别" * |
李海霞等: "汽车辅助驾驶系统交通信号灯识别" * |
黄战华等: "基于视频图像的指示灯状态监测识别技术研究" * |
Also Published As
Publication number | Publication date |
---|---|
CN111126150B (en) | 2023-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111259892B (en) | Inspection method, inspection device, inspection equipment and inspection medium for state of indicator lamp | |
CN109308447A (en) | The method of equipment operating parameter and operating status is automatically extracted in remote monitoriong of electric power | |
CN107103330A (en) | A kind of LED status recognition methods and device | |
CN107507172A (en) | Merge the extra high voltage line insulator chain deep learning recognition methods of infrared visible ray | |
CN105445607B (en) | A kind of electrical equipment fault detection method drawn based on thermoisopleth | |
CN105868722A (en) | Identification method and system of abnormal power equipment images | |
CN109120919B (en) | A kind of automatic analysis system and method for the evaluation and test of picture quality subjectivity | |
CN105242232B (en) | Outdoor electrical energy meter fault self-verifying method | |
CN109668832A (en) | Cellular li-ion battery surface bulge detection device and its method based on subregion light source | |
CN113469192B (en) | Knife switch position state identification method and image acquisition equipment | |
CN105744261B (en) | The test system and method for testing of set top box front panel | |
CN104637425A (en) | Assembly-line LED (light emitting diode) display unit uniformity detection method, system and device | |
CN114092437B (en) | Transformer leakage oil detection method | |
CN110543809A (en) | Electric power operation site risk supervision intrusion video identification method | |
CN111126150B (en) | Real-time identification method for on-off state of indicator lamp | |
CN111915601A (en) | Intelligent terminal abnormity testing method, device and system | |
CN116052041A (en) | Indicating lamp state identification method based on depth network | |
CN107727366B (en) | Detection method, device, system and the storage medium of motor car inspection and repair depositary management corridor illumination | |
CN114069844B (en) | Substation secondary equipment state image recognition method based on deep learning | |
CN116433568A (en) | LED lamp strip defect detection method and system based on depth support vector description | |
CN110838106B (en) | Multi-dimensional evaluation method for image recognition software of secondary equipment of transformer substation | |
CN211350061U (en) | Control device for automatically lighting LED screen | |
CN103927544A (en) | Machine vision grading method for ginned cotton rolling quality | |
CN112070164A (en) | Dry and wet sludge classification method and device | |
CN111931612A (en) | Indoor flame identification method and device based on image processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |