A safe passage lamp lighting detection method and device and a robot
By combining the green visual sensitivity function and the YOLOv5 network, the safety hazard caused by the extinguishing of emergency exit lights is solved, realizing fast and accurate light detection and alarm functions, and reducing the risk of injury or death in emergency situations.
Patent Information
- Application Number
- CN202310641228.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-05-31
AI Technical Summary
In existing technologies, safety exit lights may go out in an emergency, making it impossible for people to find the exit, thus posing a safety hazard.
The safety passage lights are detected using a green visual sensitivity function combined with a YOLOv5 network. The lighting status of the safety passage lights is identified through HSV color space and perspective transformation correction. The hue, saturation and brightness characteristics of the HSV color space are used for quantitative analysis, and the brightness of the lights is determined by combining the green visual sensitivity function.
It enables rapid and accurate identification of the lighting status of safety passage lights, completing the detection within an average of 7ms per frame, and can promptly issue alarms, reducing the risk of casualties in emergencies such as fires.
Smart Images

Figure CN116542961B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robots, in particular to a safety passage light lighting detection method and device and a robot. BACKGROUND
[0002] Safety passage lights in office buildings, teaching buildings, warehouses, factory buildings and the like need to be lit 24 hours a day under normal circumstances, so as to prevent the safety passage light from not being visible in the event of an emergency such as a fire, leading to the safety exit not being found and ultimately resulting in personnel casualties.
[0003] The background description provided herein is for the purpose of generally presenting the context of the disclosure. The subject matter of the background section is not prior art to the present application and is not admitted to be prior art by inclusion in this section. SUMMARY
[0004] In view of the above technical problems in the related art, the present application provides a safety passage light lighting detection method, which comprises the following steps:
[0005] S1, acquiring an image containing a safety passage light;
[0006] S2, performing safety passage light detection on the image, acquiring the position of the safety passage light in the image, and cutting out a first safety passage light image from the image according to the acquired position of the safety passage light in the image;
[0007] S3, transforming the first safety passage light image into HSV space to obtain an HSV safety passage light image, acquiring a safety passage light mark from the HSV safety passage light image, and calculating the result of the safety passage light mark according to a green visual sensitivity function, wherein when the result is greater than a preset value, it indicates that the light is on;
[0008] The green visual sensitivity function is shown in formula 1 to formula 4,
[0009]
[0010]
[0011]
[0012]
[0013] wherein, the hue mean value is represented by H, the saturation mean value is represented by S, the brightness mean value is represented by V; the proportion of the hue mean value to the safety passage mark is represented by Hs; and respectively, represent the proportion of the hue mean value to the safe lane mark; a represents the influence factor of the , and β represents the influence factor of the ; one pixel represents one unit area, S' represents the area occupied by the pixels with a hue mean value interval of [35, 90], S'' represents the area occupied by the pixels with a hue mean value interval of (45, 70), and S represents the area occupied by all the pixels of the segmented safe lane mark.
[0014] Specifically, the step S2 further includes: using a YOLOV5 network to detect the safe lane light, and simultaneously outputting key points of the safe lane light, wherein the key points are: a top-left corner point, a top-right corner point, a bottom-left corner point, and a bottom-right corner point of the safe lane light.
[0015] Specifically, the step S2 further includes: performing perspective transformation on the first safe lane light image according to the key points output by the YOLOV5 to obtain a perspective transformation corrected image.
[0016] Specifically, the step S3 is specifically: transforming the perspective transformation corrected image into an HSV space to obtain an HSV safe lane light image, obtaining a safe lane mark from the HSV safe lane light image, and calculating a result of the safe lane mark according to a green color visual sensitivity function, wherein when the result is greater than a preset value, it indicates that the light is on.
[0017] Specifically, the step of obtaining the safe lane mark is specifically: performing BGR 3-channel segmentation on the perspective transformation corrected image, performing green channel threshold segmentation on the perspective transformation corrected image to obtain a segmented safe lane light, and obtaining the safe lane mark from the perspective transformation corrected image according to the segmented safe lane light.
[0018] In a second aspect, another embodiment of the present application discloses a safe lane light on detection device, which comprises the following units:
[0019] An image acquisition unit is configured to acquire an image containing a safe lane light.
[0020] A safe lane light acquisition unit is configured to detect the safe lane light in the image, acquire a position of the safe lane light in the image, and crop a first safe lane light image from the image according to the acquired position of the safe lane light in the image.
[0021] An on detection unit is configured to transform the first safe lane light image into an HSV space to obtain an HSV safe lane light image, obtain a safe lane mark from the HSV safe lane light image, and calculate a result of the safe lane mark according to a green color visual sensitivity function, wherein when the result is greater than a preset value, it indicates that the light is on.
[0022] wherein the green vision sensitivity function is shown as formula 1 to formula 4,
[0023]
[0024]
[0025]
[0026]
[0027] wherein, represents the hue mean value, represents the saturation mean value, represents the brightness mean value; represents the proportion of the hue mean value to the safe passage sign; and both represent the proportion of the hue mean value to the safe passage sign; alpha represents the influence factor of to and beta represents the influence factor of to ; one pixel represents one unit area, S' represents the area occupied by the pixel with the hue mean value interval of [35, 90], S" represents the area occupied by the pixel with the hue mean value interval of (45, 70), and S represents the area occupied by all the pixels of the segmented safe passage sign. Specifically, the safe passage lamp acquisition unit further comprises: using a YOLOV5 network to detect the safe passage lamp, and simultaneously outputting the key points of the safe passage lamp, wherein the key points are: the upper left corner point, the upper right corner point, the lower left corner point and the lower right corner point of the safe passage lamp; performing perspective transformation on the first safe passage lamp image according to the key points output by the YOLOV5 to obtain a perspective transformation corrected image.
[0028] Specifically, the light-on detection unit is specifically: transforming the perspective transformation corrected image into HSV space to obtain an HSV safe passage lamp image, acquiring the safe passage sign from the HSV safe passage lamp image, and calculating the result of the safe passage sign according to the green vision sensitivity function, wherein when the result is greater than a preset value, it indicates that the light is on.
[0029] Specifically, acquiring the safe passage sign is specifically: performing BGR 3-channel segmentation on the perspective transformation corrected image, performing green channel threshold segmentation on the perspective transformation corrected image to obtain the segmented safe passage lamp, and acquiring the safe passage sign from the perspective transformation corrected image according to the segmented safe passage lamp.
[0030] Specifically, acquiring the safe passage sign is specifically: performing BGR 3-channel segmentation on the perspective transformation corrected image, performing green channel threshold segmentation on the perspective transformation corrected image to obtain the segmented safe passage lamp, and acquiring the safe passage sign from the perspective transformation corrected image according to the segmented safe passage lamp.
[0031] In a third aspect, another embodiment of the present application discloses a robot, comprising a processing module, a chassis, a storage module, a camera, and further comprising the safety passage light detection device.
[0032] In a fourth aspect, another embodiment of the present application discloses a robot, comprising a processing module, a chassis, a storage module, and a camera, wherein the storage module stores instructions, and the instructions, when executed, implement the safety passage light detection method.
[0033] In a fifth aspect, another embodiment of the present application discloses a non-volatile memory, wherein the non-volatile memory stores instructions, and the instructions, when executed by a processor, implement the safety passage light detection method.
[0034] The present application uses the green visual sensitivity function to identify whether the safety passage light is on, which is fast, and can reach about 7 ms per frame on average. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0036] Figure 1 is a safety passage light detection method flowchart provided by an embodiment of the present application;
[0037] Figure 2 is a safety passage light detection schematic provided by an embodiment of the present application Figure 1 ;
[0038] Figure 3 is a safety passage light detection schematic provided by an embodiment of the present application Figure 2 ;
[0039] Figure 4 is a safety passage light detection schematic provided by an embodiment of the present application Figure 3 ; wherein Figures 2-4 from left to right in the figure are a YOLOv5 output cropping image of fusion key point detection, a perspective transformation correction image, a threshold segmentation image based on a green channel, and a result image applying a green visual sensitivity function;
[0040] Figure 5 is an HSV color space schematic provided by an embodiment of the present application;
[0041] Figure 6is a safe passage lamp lighting detection device schematic diagram provided by an embodiment of the present application;
[0042] Figure 7 is a safe passage lamp lighting detection device schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.
[0044] Embodiment one
[0045] Reference Figure 1 The embodiment discloses a safe passage lamp lighting detection method, which comprises the following steps:
[0046] S1, acquiring an image containing a safe passage lamp;
[0047] The safe passage lamp lighting detection of the embodiment is applied to a robot, and the robot of the embodiment comprises a chassis, a camera, and a positioning and navigation module. The chassis is a controllable chassis and can move. The camera is installed on the head of the robot, and the camera is a high-definition camera and is used to acquire images in real time.
[0048] The robot of the embodiment continuously patrols a target site to shoot images, so as to analyze whether the safe passage lamp is lit. Specifically, the robot has built a map for the target site when patrolling the target site. Specifically, the mapping method can adopt a SLAM method, and the SLAM method is a commonly used mapping method in the art, and will not be described herein.
[0049] The camera of the embodiment is rotatable, and the patrol route is fixed. The camera of the robot can be controlled in real time to shoot a front picture of the safe passage lamp.
[0050] When the robot patrols in a fixed scene environment, the robot patrols the target site in a reciprocating cycle according to a certain annular path, and the patrol route can be artificially set. In the process of patrolling, the camera on the head of the robot can capture images of each place of the scene in real time, and then transmit the images to a background algorithm server through a network module for analysis and early warning. In another embodiment, the robot can also analyze the images and give early warning locally.
[0051] S2, safety channel lamp detection is performed on the image, the position of the safety channel lamp in the image is obtained, and a first safety channel lamp image is cropped from the image according to the position of the safety channel lamp in the image;
[0052] Specifically, the detection of the safety channel lamp in this embodiment can adopt the form of a neural network, for example, YOLOV5.
[0053] Further, when the YOLOV5 network is used to detect the safety channel lamp, the key points of the safety channel lamp are also output, and the key points are the upper left corner point, the upper right corner point, the lower left corner point and the lower right corner point of the safety channel lamp.
[0054] The upper left corner point, the upper right corner point, the lower left corner point and the lower right corner point of the safety channel lamp are obtained in this embodiment, and the four points (i.e. the key points, such as the four points of the safety channel lamp in the first column of the image in Figures 3-4
[0055] Further, in the obtained image, the image may not be front-facing, as shown in the first column of the image in Figures 2-4 to further improve the accuracy of obtaining the safety channel lamp. In this embodiment, the first safety channel lamp image is perspective transformed according to the key points output by YOLOV5 to obtain a perspective transformation correction image.
[0056] S3, the first safety channel lamp image is transformed into HSV space to obtain an HSV safety channel lamp image, and the safety channel lamp mark is obtained from the HSV safety channel lamp image, and the result of the safety channel lamp mark is calculated according to the green visual sensitivity function, and when the result is greater than a preset value, it indicates that the light is on.
[0057] Specifically, after the perspective transformation of the first safety channel lamp image, step S3 is: transforming the perspective transformation correction image into HSV space to obtain an HSV safety channel lamp image, and obtaining the safety channel lamp mark from the HSV safety channel lamp image, and calculating the result of the safety channel lamp mark according to the green visual sensitivity function, and when the result is greater than a preset value, it indicates that the light is on.
[0058] Specifically, in this embodiment, the safety channel lamp mark is obtained by: performing BGR3 channel segmentation on the perspective transformation correction image, performing green channel threshold segmentation on the perspective transformation correction image to obtain the segmented safety channel lamp, and obtaining the safety channel lamp mark from the perspective transformation correction image according to the segmented safety channel lamp. Reference Figures 2-4 The third column in the third column of the figure is the third column of the figure. The green channel threshold segmentation is given to the safe channel lamp. The segmented result is a binary image, where white is a safe channel lamp. According to the pixel position of the white safe channel lamp, only the safe channel lamp mark is obtained from the perspective transformation correction image, and the background can be set to black.
[0059] There is a good matching relationship between color features and visual subjective features. The HSV color space realizes the quantitative description of color by using hue, saturation and brightness. The conical model of the HSV color space is shown in Figure 5 Compared with other color spaces, HSV more accurately reflects the understanding of human visual perception system to color. Therefore, the results obtained by analyzing the safe channel lamp in the HSV color space can be more consistent with the subjective judgment of human visual system.
[0060] According to the conical model, it can be known from Figure 5 that the positions of different hues, saturations and brightnesses in the cone are different. Different hues, i.e. different colors, correspond to different angles; the greater the saturation, the greater the radius of the circular base of the corresponding cone; the greater the brightness, the greater the height of the corresponding cone, so for different hues, saturations and brightnesses, the volume of the cone can be quantitatively represented to a certain extent. Since almost all safe channel lamps are green when lit and white when not lit, and the safe channel mark containing fluorescent function without electricity is also green, only green is concerned for the safe channel lamp when lit. Stevens law points out that the subjective feeling p is in power relationship with the external stimulus q: p=k·q n , and points out that when n≈0.6, it is consistent with the response of the visual system to brightness.
[0061] In addition, the color of the same object photographed under different devices, different illuminations, different angles and other conditions may have large differences, and different parts of the same object may also exhibit large differences in color, so the area of the safe channel lamp mark occupied by the green pixels is also considered.
[0062] Comprehensive analysis, the green visual sensitivity function (formula 1 to formula 4) of the embodiment can more accurately describe the subjective feeling of the visual system, and quantitatively describe the color representation of the safe channel lamp. Assuming that the sensitivity to black is 0, since the green visual sensitivity function of the embodiment only considers green, the sensitivity of other colors is also 0.
[0063]
[0064]
[0065]
[0066]
[0067] wherein, represents the hue mean value, represents the saturation mean value, represents the brightness mean value; represents the proportion of the hue mean value to the safe passage sign; and both represent the proportion of the hue mean value to the safe passage sign; α represents an influence factor on , and β represents an influence factor on ; one pixel represents one unit area, S' represents the area occupied by the pixels with the hue mean value interval of [35, 90], S'' represents the area occupied by the pixels with the hue mean value interval of (45, 70), and S represents the area occupied by all the pixels of the segmented safe passage sign;
[0068] Through a large number of experimental calculations, α is set to 0.3 and β is set to 0.7, so that some interference can be eliminated and the robustness of the algorithm is ensured; the threshold value of the green sensitivity function is set to 1000, and when the function value is greater than the threshold value, it is considered that the safe passage light is on, and when the function value is less than or equal to the threshold value, it is considered that the safe passage light is off.
[0069] Referring to Figures 2-4 , there are a total of 3 groups of figures, one group per row, and each row has 4 columns of figures, wherein the first column is the cropped figure of the YOLOv5 output of the fusion key point detection, the second column is the figure corrected by the perspective transformation through the key points, the third column is the threshold segmentation figure based on the green channel, and the fourth column is the result figure of the application of the green visual sensitivity function. For Figure 2 , it is a safe passage light on figure in a relatively dark environment, and the safe passage sign light is very obvious, the output value of the green visual sensitivity function is 15536.99 (greater than 1000), and the logical judgment is that the light is on. For Figure 3 , it is a safe passage light off case in a relatively bright environment, the output value of the green visual sensitivity function is 0.00 (less than or equal to 1000), and the logical judgment is that the light is off. For Figure 4 , it is a light on figure in a relatively bright environment, and it may be affected by the equipment, angle and illumination, the green of the safe passage sign is not pure enough, the output value of the green visual sensitivity function is 4041.70 (greater than 1000), and the logical judgment is that the light is on.
[0070] Specifically, the embodiment further includes a step S4 of sending an alarm information to the background when the light that is off is identified.
[0071] When a non-lit lamp is identified, the background can be timely reported to remind the relevant staff to repair and light up. When an emergency such as fire occurs, the correct safe passage direction can be provided to prevent the situation of getting lost due to smoke spreading, and finally help personnel escape from the scene and reduce the casualty rate.
[0072] The embodiment uses a green visual sensitivity function to identify whether the safe passage lamp is lit, which is fast, and can reach about 7ms per frame on average.
[0073] Embodiment two
[0074] Reference Figure 6 The embodiment discloses a safe passage lamp lighting detection device, which comprises the following units:
[0075] An image acquisition unit is configured to acquire an image containing a safe passage lamp.
[0076] A safe passage lamp acquisition unit is configured to perform safe passage lamp detection on the image, acquire the position of the safe passage lamp in the image, and crop a first safe passage lamp image from the image according to the acquired position of the safe passage lamp in the image.
[0077] Specifically, the detection of the safe passage lamp can be in the form of a neural network, such as YOLOV5.
[0078] Further, when the YOLOV5 network is used for safe passage lamp detection, the key points of the safe passage lamp are also output, which are the top-left corner point, top-right corner point, bottom-left corner point, and bottom-right corner point of the safe passage lamp.
[0079] The top-left corner point, top-right corner point, bottom-left corner point, and bottom-right corner point of the safe passage lamp are acquired, and the four points (i.e., the key points, such as the four points of the safe passage lamp in the first column of the image in Figures 3-4 , are used for subsequent perspective transformation and correction of the image for subsequent operations.
[0080] Further, in the acquired image, the photographed image can not be front-facing, as shown in the first column of the image in Figures 2-4 , to further improve the accuracy of acquiring the safe passage lamp. The embodiment performs perspective transformation on the first safe passage lamp image according to the key points output by YOLOV5 to obtain a perspective transformation correction image.
[0081] A lighting detection unit is configured to transform the first safe passage lamp image into an HSV space to obtain an HSV safe passage lamp image, acquire a safe passage lamp mark from the HSV safe passage lamp image, and calculate the result of the safe passage lamp mark according to a green visual sensitivity function. When the result is greater than a preset value, it indicates that the light is on.
[0082] Specifically, after the perspective transformation of the first safety lane light image, the light detection unit transforms the perspective transformation corrected image into HSV space to obtain an HSV safety lane light image, and acquires a safety lane light mark from the HSV safety lane light image, and calculates the result of the safety lane light mark according to the green visual sensitivity function. When the result is greater than a preset value, it indicates that the light is on.
[0083] Specifically, in the embodiment, acquiring the safety lane light mark specifically includes: performing BGR3 channel segmentation on the perspective transformation corrected image, performing green channel threshold segmentation on the perspective transformation corrected image to obtain a segmented safety lane light, and acquiring the safety lane light mark from the perspective transformation corrected image according to the segmented safety lane light. Figures 2-4 The third column in the figure is the result of giving the green channel threshold segmentation to obtain the safety lane light. The segmented result is a binary image, in which the white color is the safety lane light. The safety lane light mark is acquired from the perspective transformation corrected image according to the pixel position of the white safety lane light, and the background can be set to black.
[0084] There is a good matching relationship between color features and visual subjective features. The HSV color space realizes the quantitative description of color by using hue, saturation and brightness. The cone model of the HSV color space is shown in Figure 5 Compared with other color spaces, HSV more accurately reflects the understanding of the human visual perception system to color. Therefore, the result obtained by analyzing the safety lane light in the HSV color space can be more consistent with the subjective judgment of the human visual system.
[0085] According to the cone model, it can be known from Figure 5 that the positions of different hues, saturations and brightnesses in the cone are different. Different hues, i.e. different colors, correspond to different angles; the greater the saturation, the greater the radius of the circular base of the corresponding cone; the greater the brightness, the greater the height of the corresponding cone. Therefore, for different hues, saturations and brightnesses, the volume of the cone can be used for quantitative representation to a certain extent. Since almost all safety lane light lights are green, and the safety lane mark containing the fluorescent function without electricity is also green, only the green color needs to be concerned for the safety lane light light. Stevens' law points out that the subjective perception p and the external stimulus quantity q are in a power relationship: p=k·q n , and points out that when n≈0.6, it conforms to the response of the visual system to brightness.
[0086] In addition, the color of the same object photographed under different devices, different illuminations, different angles and the like can have large differences, and different parts of the same object can also exhibit large differences in color. Therefore, the area of the safety lane light sign occupied by green pixels is also considered.
[0087] In summary, the green visual sensitivity function (formula 1 to formula 4) of the embodiment can more accurately describe the subjective perception of the visual system and quantitatively describe the color representation of the safety lane light. Assuming that the sensitivity to black is 0, since the green visual sensitivity function of the embodiment only considers green, the sensitivity to other colors is also 0.
[0088]
[0089]
[0090]
[0091]
[0092] wherein, represents the hue mean value, represents the saturation mean value, represents the brightness mean value; represents the proportion of the hue mean value to the safety lane sign; and both represent the proportion of the hue mean value to the safety lane sign; α represents an influence factor on , and β represents an influence factor on ; one pixel represents one unit area, S' represents the area occupied by the pixels with the hue mean value interval [35, 90], S" represents the area occupied by the pixels with the hue mean value interval (45, 70), and S represents the area occupied by all the pixels of the segmented safety lane light sign;
[0093] Through a large number of experimental calculations, α is set to 0.3 and β is set to 0.7, which can eliminate some interference and ensure the robustness of the algorithm; the threshold value of the green sensitivity function is set to 1000, and when the function value is greater than the threshold value, it is considered that the safety lane light is on, and when the function value is less than or equal to the threshold value, it is considered that the safety lane light is off.
[0094] Referring to Figures 2-4 , there are a total of 3 groups of figures, one row for one group, and each row has 4 columns of figures, wherein the first column is the cropped figure of the YOLOv5 output of the fusion key point detection, the second column is the figure corrected by the perspective transformation through the key points, the third column is the threshold segmentation figure based on the green channel, and the fourth column is the result figure of the application of the green visual sensitivity function. ForFigure 2 This is a safe passage light in a dark environment, and the safe passage sign is bright, the output value of the green visual sensitivity function is 15536.99 (greater than 1000), and the logical judgment is that the light is on. For Figure 3 This is a safe passage light in a dark environment, and the safe passage sign is bright, the output value of the green visual sensitivity function is 15536.99 (greater than 1000), and the logical judgment is that the light is on. For Figure 4 This is a safe passage light in a dark environment, and the safe passage sign is bright, the output value of the green visual sensitivity function is 15536.99 (greater than 1000), and the logical judgment is that the light is on. For
[0095] Specifically, the embodiment further includes an alarm unit for sending alarm information to the background when a non-lit light is identified.
[0096] When a non-lit light is identified, the background can be timely reported to remind relevant staff to repair the light. When an emergency such as a fire occurs, the correct safe passage direction can be provided to prevent the situation of getting lost due to smoke, and ultimately help personnel to escape from the scene and reduce the casualty rate.
[0097] The embodiment uses the green visual sensitivity function to identify whether the safe passage light is on, which is fast, and can reach about 7ms per frame on average.
[0098] Embodiment three
[0099] The embodiment discloses a robot, which comprises a processing module, a chassis, a storage module, and a camera, wherein the storage module stores instructions, and when the instructions are executed, a safe passage light detection method according to the embodiment one is implemented.
[0100] In another embodiment, a robot comprises a processing module, a chassis, a storage module, and a camera, and further comprises a safe passage light detection device according to the embodiment two.
[0101] Embodiment four
[0102] Reference Figure 7 , Figure 7 is a structural schematic diagram of a safe passage light detection device according to the embodiment. The safe passage light detection device 20 of the embodiment comprises a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. The processor 21 implements the steps in the above method embodiments when executing the computer program. Alternatively, the processor 21 implements the functions of each module / unit in the above device embodiments when executing the computer program.
[0103] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the safety passage light on detection device 20. For example, the computer program can be divided into the modules in Embodiment Two, and the specific functions of the modules can refer to the working process of the device described in the above embodiments, which will not be repeated here.
[0104] The safety passage light on detection device 20 can include, but is not limited to, the processor 21 and the memory 22. Those skilled in the art can understand that the schematic diagram is only an example of the safety passage light on detection device 20, and does not constitute a limitation on the safety passage light on detection device 20, and can include more or less components than the diagram, or combine certain components, or different components, for example, the safety passage light on detection device 20 can also include an input / output device, a network access device, a bus, etc.
[0105] The processor 21 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor 21 is the control center of the safety passage light on detection device 20, which connects all parts of the safety passage light on detection device 20 through various interfaces and lines.
[0106] The memory 22 can be used to store the computer programs and / or modules, and the processor 21 realizes various functions of the safety channel light-on detection device 20 by running or executing the computer programs and / or modules stored in the memory 22, and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, etc.), and the like; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), and the like. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0107] The modules / units integrated in the safety channel light-on detection device 20 can be stored in a computer readable storage medium if they are realized in the form of software function units and sold or used as independent products. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program can realize the steps of the above-mentioned various method embodiments when executed by the processor 21. The computer program includes computer program code, which can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the computer readable medium can include or exclude contents according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0108] It should be noted that the apparatus embodiments described above are merely illustrative, and the units described as separate units can or can not be physically separate, and the units shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. In addition, the connection relationship between the modules in the apparatus embodiment provided by the present application indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0109] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting the illumination of a safety passage light, comprising the following steps: S1, acquire an image containing the safety exit lights; S2, perform safety passage light detection on the image, obtain the position of the safety passage light in the image, and crop out the first safety passage light image from the image based on the obtained position of the safety passage light in the image; S3, transform the first safety passage light diagram into HSV space to obtain an HSV safety passage light diagram, obtain the safety passage light sign from the HSV safety passage light diagram, and calculate the result of the safety passage light sign according to the green visual sensitivity function. When the result is greater than a preset value, it indicates that the light is on. The green visual sensitivity function is shown in Equations 1 to 4. in, Indicates the mean hue. This represents the mean saturation. Indicates the average brightness; This indicates the proportion of the average hue value to the safety exit sign. and "Each" represents the proportion of the color tone mean to the safety exit sign; "α" represents the proportion of the color tone mean to the safety exit sign. The influence factor, β, represents the impact on The influence factor; one pixel represents one unit area, S′ represents the area occupied by pixels with a hue mean range of [35,90], S″ represents the area occupied by pixels with a hue mean range of (45,70), and S represents the area occupied by all pixels of the segmented safety passage light sign.
2. The method according to claim 1, wherein step S2 further comprises: The YOLOv5 network is used to detect safety exit lights, and the key points of the safety exit lights are also output. The key points are: the upper left corner, the upper right corner, the lower left corner, and the lower right corner.
3. The method according to claim 2, wherein step S2 further comprises: Based on the key points output by YOLOv5, a perspective transformation is performed on the first safety channel light diagram to obtain a perspective transformation correction diagram.
4. The method according to claim 3, wherein step S3 specifically comprises: transforming the perspective transformation correction image into HSV space to obtain an HSV safety passage light image, obtaining a safety passage light sign from the HSV safety passage light image, and calculating the result of the safety passage light sign according to the green visual sensitivity function, wherein when the result is greater than a preset value, the light is turned on.
5. The method according to claim 4, specifically obtaining the safety passage light sign comprises: performing BGR 3-channel segmentation on the perspective transformation corrected image, and performing green channel threshold segmentation on the perspective transformation corrected image to obtain the segmented safety passage light, and obtaining the safety passage light sign from the perspective transformation corrected image based on the segmented safety passage light.
6. A safety passage light illumination detection device, comprising the following units: An image acquisition unit is used to acquire images containing safety passage lights; The safety passage light acquisition unit is used to detect safety passage lights in the image, acquire the position of the safety passage lights in the image, and crop out the first safety passage light image from the image based on the acquired position of the safety passage lights in the image. The lighting detection unit is used to transform the first safety passage light image into HSV space to obtain an HSV safety passage light image, obtain the safety passage light sign from the HSV safety passage light image, and calculate the result of the safety passage light sign according to the green visual sensitivity function. When the result is greater than a preset value, it indicates that the light is on. The green visual sensitivity function is shown in Equations 1 to 4. in, Indicates the mean hue. This represents the mean saturation. Indicates the average brightness; This indicates the proportion of the average hue value to the safety exit sign. and "Each" represents the proportion of the color tone mean to the safety exit sign; "α" represents the proportion of the color tone mean to the safety exit sign. The influence factor, β, represents the impact on The influence factor; one pixel represents one unit area, S′ represents the area occupied by pixels with a hue mean range of [35,90], S″ represents the area occupied by pixels with a hue mean range of (45,70), and S represents the area occupied by all pixels of the segmented safety passage light sign.
7. The apparatus according to claim 6, wherein the safety passage light acquisition unit further comprises: The YOLOv5 network is used to detect safety passage lights, and key points of the safety passage lights are also output. The key points are: the upper left corner, the upper right corner, the lower left corner, and the lower right corner. Based on the key points output by YOLOv5, the first safety passage light image is subjected to perspective transformation to obtain a perspective transformation correction image.
8. The apparatus according to claim 7, wherein the lighting detection unit specifically comprises: transforming the perspective transformation correction image into HSV space to obtain an HSV safety passage light image, obtaining a safety passage light sign from the HSV safety passage light image, and calculating the result of the safety passage light sign according to the green visual sensitivity function, wherein when the result is greater than a preset value, the light is turned on.
9. The apparatus according to claim 8, specifically, obtaining the safety passage light sign comprises: performing BGR 3-channel segmentation on the perspective transformation corrected image, and performing green channel threshold segmentation on the perspective transformation corrected image to obtain the segmented safety passage light, and obtaining the safety passage light sign from the perspective transformation corrected image based on the segmented safety passage light.
10. A robot, the robot comprising: The system includes a processing module, a chassis, a storage module, a camera, and a safety passage light detection device as described in any one of claims 6-9.
Citation Information
Patent Citations
Secure channel indication lamp operation state certification mechanism
CN109120895A
Method, device and equipment for identifying on-state of traffic light, and storage medium
CN111402610A