Indicator light recognition method and device, electronic device, and computer-readable storage medium

By acquiring images with different exposure times and performing binarization processing, identifying the characteristic parameters of the indicator light, the problem of preset positions in the prior art is solved, and the indicator lights with different brightness and shapes are efficiently recognized, which are suitable for a variety of products and scenarios.

CN113780037BActive Publication Date: 2025-09-02ZTE CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010522121.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-10
Publication Date
2025-09-02
Estimated Expiration
2040-06-10

AI Technical Summary

Technical Problem

The existing indicator light recognition method requires presetting the position of the indicator light, and it cannot adapt to indicator lights of different brightness and shapes, resulting in low recognition efficiency and cannot be applied to various products and application scenarios.

Method used

By acquiring the original images at different exposure times and performing binarization processing, the characteristic parameters of the indicator light are identified, and the presetting of the indicator light position and the installation of light guide fiber or sensor are avoided, and the indicator light of different brightness is identified by using the image brightness differences under different exposure times.

Benefits of technology

It improves the efficiency and applicability of indicator light recognition, can recognize indicator lights of various brightness, and is not affected by shape, and is suitable for a variety of products and scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113780037B_ABST
    Figure CN113780037B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for identifying indicator lights, comprising: obtaining original images corresponding to different exposure times for a certain area; binarizing the original images to obtain a final binary image; and determining characteristic parameters of indicator lights within the certain area based on the final binary image. Embodiments of the present disclosure improve recognition efficiency and are capable of identifying indicator lights of varying brightness, making them suitable for a variety of products and application scenarios. The present disclosure also provides an indicator light recognition device and system, an electronic device, and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of machine vision technology, and in particular to a method, device and system for identifying indicator lights, an electronic device, and a computer-readable storage medium. Background Art

[0002] In industrial and living environments, there are various indicator lights. In some cases, it is necessary to identify the indicator lights. Current indicator light identification methods require installing light-guiding fibers or sensors for each indicator light, or pre-marking the indicator light location. As a result, the identification efficiency is relatively low. Summary of the Invention

[0003] Embodiments of the present disclosure provide a method, device, and system for identifying an indicator light, an electronic device, and a computer-readable medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for identifying an indicator light, comprising:

[0005] Obtain the original images corresponding to different exposure times of a certain area;

[0006] Performing binarization processing on the original image to obtain a final binarized image;

[0007] The characteristic parameters of the indicator lights in a certain area are determined according to the final binary image.

[0008] In a second aspect, an embodiment of the present disclosure provides an electronic device, including:

[0009] at least one processor;

[0010] A memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements any one of the above-mentioned indicator light recognition methods.

[0011] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned indicator light recognition methods when the program is executed by a processor.

[0012] In a fourth aspect, an embodiment of the present disclosure provides an indicator light recognition system, comprising:

[0013] An image acquisition device, used to capture original images corresponding to different exposure times of a certain area;

[0014] The indicator light recognition device is used to obtain original images corresponding to different exposure times of a certain area; binarize the original images to obtain a final binary image; and determine the characteristic parameters of the indicator lights in a certain area based on the final binary image.

[0015] The indicator light recognition method provided by the embodiment of the present disclosure only requires binarization processing of the original images corresponding to different exposure times to realize the recognition of the indicator light, without the need to pre-set the position of the indicator light or install a light-guiding fiber or sensor for each indicator light. The recognition result is also not affected by the shape of the indicator light, thereby improving the recognition efficiency. Moreover, since the brightness of the original images corresponding to different exposure times is different, indicator lights of different brightness can be recognized based on the original images corresponding to different exposure times, which is suitable for various products and application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a method for identifying an indicator light provided in an embodiment of the present disclosure;

[0017] Figure 2 A block diagram of a device for identifying an indicator light provided in an embodiment of the present disclosure;

[0018] Figure 3 A block diagram of a system for identifying an indicator light provided in an embodiment of the present disclosure;

[0019] Figure 4 A schematic diagram of identifying an indicator light on a chassis provided in Example 1 of an embodiment of the present disclosure;

[0020] Figure 5 A flowchart of a method for identifying an indicator light provided in Example 1 of an embodiment of the present disclosure;

[0021] Figure 6 A schematic diagram of the image binarization processing effect provided in Example 1 of the embodiment of the present disclosure;

[0022] Figure 7 A schematic diagram of identifying product indicator lights on an assembly line is provided in Example 2 of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the indicator light recognition method, device and system, electronic device, and computer-readable storage medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.

[0024] Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the scope of this disclosure to those skilled in the art.

[0025] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0026] As used herein, the term "and / or" includes any and all combinations of at least one of the associated listed items.

[0027] The terms used herein are used only to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements, and / or components is specified, but the presence or addition of at least one other feature, whole, step, operation, element, component, and / or group thereof is not excluded.

[0028] The embodiments described herein may be described with reference to plan views and / or cross-sectional views, with the aid of idealized schematic diagrams of the present disclosure. Thus, the example illustrations may be modified based on manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to the embodiments shown in the accompanying drawings, but include modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the accompanying drawings are schematic in nature, and the shapes of the regions shown in the drawings illustrate specific shapes of the regions of the elements, but are not intended to be limiting.

[0029] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.

[0030] There are currently several methods for identifying indicator lights: manual identification, dedicated sensor identification, and machine vision identification.

[0031] Among them, manual identification is prone to problems such as omissions and misjudgments, and is less efficient.

[0032] Among them, the method of using sensors to identify indicator lights uses optical fibers to collect the indicator light and transmit it to the sensor for identification. This method has the following problems: First, the position and color of the indicator light must be determined in advance; second, the sensor must be aligned with the indicator light, which is difficult to install, debug, and maintain. Moreover, each sensor can only identify one indicator light; if the indicator light position changes, the sensor must be reinstalled and repositioned; finally, it is susceptible to interference from ambient light or light from other indicators, making it difficult to detect dimmer indicators.

[0033] Among them, the method of using machine vision for recognition is to obtain an image of the indicator light through an image sensor, and extract the target features based on the pixel distribution, brightness, color and other information of the image, so as to make judgments and measurements. Current machine vision recognition methods have the following problems: First, the position of the indicator light must be marked in advance, and then the indicator light status is judged based on the predetermined position. Once the relative position between the indicator light and the image sensor changes, recalibration, recalculation and recognition are required; second, the current machine vision recognition method is based on the characteristics of the indicator light, so various feature values ​​must be set before recognition, and they need to be reset when changing to other models; finally, the current machine vision recognition method is based on fixed thresholds of features such as brightness and color for recognition, and cannot simultaneously recognize multiple indicator lights with large differences in brightness.

[0034] In summary, the current indicator light recognition method is inefficient and cannot be applied to various products and application scenarios.

[0035] Figure 1 The present invention provides a flowchart of a method for identifying an indicator light according to an embodiment of the present invention.

[0036] First, refer to Figure 1 , an embodiment of the present disclosure provides a method for identifying an indicator light, comprising:

[0037] Step 100: Acquire original images corresponding to different exposure times of a certain area.

[0038] Step 101: Binarize the original image to obtain a final binary image.

[0039] Step 102: Determine characteristic parameters of the indicator lights in a certain area based on the final binary image.

[0040] The indicator light recognition method provided by the embodiment of the present disclosure only requires binarization processing of the original images corresponding to different exposure times to realize the recognition of the indicator light, without the need to pre-set the position of the indicator light or install a light-guiding fiber or sensor for each indicator light. The recognition result is also not affected by the shape of the indicator light, thereby improving the recognition efficiency. Moreover, since the brightness of the original images corresponding to different exposure times is different, indicator lights of different brightness can be recognized based on the original images corresponding to different exposure times, which is suitable for various products and application scenarios.

[0041] In some exemplary embodiments, before binarizing the original image to obtain a final binary image, the method further includes: removing original images that meet an invalid condition from the original image to obtain a valid image;

[0042] The final binary image obtained by binarizing the original image includes:

[0043] The effective image is binarized to obtain the final binary image.

[0044] In other words, there are two implementation methods: the first is to binarize the original image to obtain a final binary image; based on this final binary image, the characteristic parameters of the indicator lights within a certain area are determined; the second is to remove the original images that meet the invalid condition from all the original images obtained to obtain a valid image; binarize the valid image to obtain a final binary image; and based on this final binary image, the characteristic parameters of the indicator lights within a certain area are determined. The second method eliminates the original images that meet the invalid condition and performs recognition based on the valid image, improving recognition accuracy.

[0045] The specific implementation processes of these two methods are described in detail below.

[0046] The first method is to perform binarization processing on the original image to obtain a final binary image; and determine the characteristic parameters of the indicator lights in a certain area according to the final binary image.

[0047] In some exemplary embodiments, performing binarization on the original image to obtain a final binarized image includes:

[0048] Each original image is binarized to obtain a corresponding intermediate binary image; and all intermediate binary images are superimposed to obtain a final binary image.

[0049] In some exemplary embodiments, performing binarization on each original image to obtain a corresponding intermediate binarized image includes:

[0050] For each obtained original image, obtain binarized images corresponding to different target intervals; select a binarized image with x number of first suspected regions from the binarized images corresponding to all target intervals; and select a binarized image with an arrangement order in the middle among the binarized images with x number of first suspected regions as an intermediate result binarized image;

[0051] Where x is the number of first suspicious regions of the binary images in the subset with the largest number of binary images among the subsets obtained by dividing the binary images corresponding to all target intervals; binary images with the same number of first suspicious regions and arranged in a continuous order are divided into the same subset;

[0052] The target interval includes: the value range of hue (such as H value), the value range of saturation (such as S value), and the value range of lightness (such as V value); the value range of hue is the same for different target intervals, the value range of saturation is the same for different target intervals, and the value range of lightness is different for different target intervals;

[0053] The first suspected area is a connected area formed by the first color pixels in the binary image; and the binary images corresponding to all target intervals are arranged in order from large to small or from small to large according to the value range of the brightness of the target interval.

[0054] The binarization method of the disclosed embodiment separates the target of interest from the background, thereby simplifying subsequent processing and increasing processing speed. That is, through binarization, the area where the indicator light may be present is separated from the area where the indicator light is not present.

[0055] It should be noted that when the number of binary images with the number of first suspected areas being x is an odd number, the binary image with the arrangement order in the middle can be directly selected as the intermediate result binary image; when the number of binary images with the number of first suspected areas being x is an even number, any one of the two binary images with the arrangement order in the middle can be selected as the intermediate result binary image.

[0056] In some exemplary embodiments, the following method may be used to obtain a binary image corresponding to a target interval:

[0057] For each pixel in the original image, after determining that the hue of the pixel is within the hue value range of the target interval, the saturation of the pixel is within the saturation value range of the target interval, and the brightness of the pixel is within the brightness value range of the target interval, the pixel is set to the first color; after determining that the hue of the pixel is outside the hue value range of the target interval, or the saturation of the pixel is outside the saturation value range of the target interval, or the brightness of the pixel is outside the brightness value range of the target interval, the pixel is set to the second color.

[0058] In some exemplary embodiments, the first color is white and the second color is black. In other exemplary embodiments, the first color is black and the second color is white. In other exemplary embodiments, the first color and the second color may be other colors as long as they can be distinguished from each other. The embodiments of the present disclosure do not limit the specific values ​​of these two colors.

[0059] In some exemplary embodiments, the first suspected area is an area in the binary image where an indicator light may exist.

[0060] In some exemplary embodiments, the upper limit values ​​of the brightness value ranges of different target intervals are the same, but the lower limit values ​​are different.

[0061] In some exemplary embodiments, the value range of the hue of the target interval is the value range of the hue corresponding to red, green and blue in the color space; wherein, the value range of the hue corresponding to red in the color space is: 0-10, 156-180, the value range of the hue corresponding to green in the color space is: 35-77, and the value range of the hue corresponding to blue in the color space is: 100-124.

[0062] In some exemplary embodiments, the saturation value range of the target interval is the saturation value range corresponding to red, green, and blue in the color space, that is, 43-255.

[0063] In some exemplary embodiments, the value range of the brightness of the target interval is part or all of the value range of the brightness corresponding to red, green and blue in the color space; wherein the value range of the brightness corresponding to red, green and blue in the color space is: 45-255.

[0064] In some exemplary embodiments, superimposing all intermediate binarized images to obtain a final binarized image includes:

[0065] The second suspected regions in all intermediate result binary images that are at the same position, whose shape difference is within a first preset range, and whose size difference is within a second preset range are superimposed to obtain a third suspected region at the same position in the final result binary image; wherein the second suspected region is a connected region formed by the first color pixels in the intermediate result binary image, and the third suspected region is a connected region formed by the first color pixels in the final result binary image.

[0066] In some exemplary embodiments, whether the second suspected regions in different intermediate result binarized images are in the same position can be determined based on whether the ratio of pixels in the second suspected regions in the different intermediate result binarized images that have the same position is greater than or equal to a fifth preset threshold. Specifically, when the ratio of pixels in the second suspected regions in the different intermediate result binarized images that have the same position is greater than or equal to the fifth preset threshold, it is determined that the second suspected regions in the different intermediate result binarized images are in the same position; when the ratio of pixels in the second suspected regions in the different intermediate result binarized images that have the same position is less than the fifth preset threshold, it is determined that the second suspected regions in the different intermediate result binarized images are in different positions.

[0067] In other exemplary embodiments, whether the second suspected regions in different intermediate result binarized images are in the same position can be determined based on whether the centroid pixels or center pixels of the second suspected regions in different intermediate result binarized images are in the same position. Specifically, when the centroid pixels or center pixels of the second suspected regions in different intermediate result binarized images are in the same position, it is determined that the second suspected regions in the different intermediate result binarized images are in the same position; when the centroid pixels or center pixels of the second suspected regions in different intermediate result binarized images are in different positions, it is determined that the second suspected regions in the different intermediate result binarized images are in different positions.

[0068] Of course, there are many other methods to determine whether the second suspected areas in different intermediate binary images are in the same position. The specific determination method is not used to limit the protection scope of the embodiment of the present disclosure and will not be repeated here.

[0069] In some exemplary embodiments, whether the difference in shape of the second suspected regions in different intermediate result binarized images is within a first preset range can be determined based on the length and width of the minimum bounding rectangles of the second suspected regions in different intermediate result binarized images. Specifically, when the difference in length of the minimum bounding rectangles of the second suspected regions in different intermediate result binarized images is less than or equal to a sixth preset threshold, and the difference in width is less than or equal to a seventh preset threshold, it is determined that the difference in shape of the second suspected regions in different intermediate result binarized images is within the first preset range; when the difference in length of the minimum bounding rectangles of the second suspected regions in different intermediate result binarized images is greater than the sixth preset threshold, or the difference in width is greater than the seventh preset threshold, it is determined that the difference in shape of the second suspected regions in different intermediate result binarized images is not within the first preset range.

[0070] Of course, there are many other methods to determine whether the difference in shape of the second suspected area in different intermediate binary images is within the first preset range. The specific judgment method is not used to limit the protection scope of the embodiment of the present disclosure and will not be repeated here.

[0071] In some exemplary embodiments, whether the difference in size of the second suspected regions in different intermediate result binarized images is within a second preset range may be determined based on the areas of the minimum bounding rectangles of the second suspected regions in different intermediate result binarized images. Specifically, when the difference in area of ​​the minimum bounding rectangles of the second suspected regions in different intermediate result binarized images is less than or equal to an eighth preset threshold, it is determined that the difference in size of the second suspected regions in the different intermediate result binarized images is within the second preset range; when the difference in area of ​​the minimum bounding rectangles of the second suspected regions in different intermediate result binarized images is greater than the eighth preset threshold, it is determined that the difference in size of the second suspected regions in the different intermediate result binarized images is not within the second preset range.

[0072] Of course, there are many other methods to determine whether the difference in the size of the second suspected area in different intermediate binary images is within the first preset range. The specific judgment method is not used to limit the protection scope of the embodiment of the present disclosure and will not be repeated here.

[0073] In some exemplary embodiments, the method for superimposing the second suspected regions in all intermediate binary images that are at the same position, whose shape difference is within a first preset range, and whose size difference is within a second preset range can be: taking the union or intersection of the second suspected regions in all intermediate binary images that are at the same position, whose shape difference is within a first preset range, and whose size difference is within a second preset range. Of course, other superposition methods can also be used. The present disclosure does not limit the specific superposition method, nor is the specific superposition method used to limit the scope of protection of the present disclosure, and will not be described in detail here.

[0074] In some exemplary embodiments, the characteristic parameter includes at least one of the following: number, position, and color.

[0075] In some exemplary embodiments, determining characteristic parameters of indicator lights within a certain area based on the final binary image includes:

[0076] The number of indicator lights in a certain area is determined as the number of third suspected areas in the final binary image; wherein the third suspected areas are connected areas formed by first color pixels in the final binary image.

[0077] In some exemplary embodiments, determining characteristic parameters of indicator lights within a certain area based on the final binary image includes:

[0078] The position of the indicator light in a certain area is determined as the position of the third suspected area in the final binary image; wherein the third suspected area is a connected area formed by the first color pixels in the final binary image.

[0079] In some exemplary embodiments, determining characteristic parameters of indicator lights within a certain area based on the final binary image includes:

[0080] For each third suspected region in the final binary image, obtain, from all intermediate binary images, an intermediate binary image having a second suspected region located at the same position as the third suspected region, having a shape difference within a first preset range, and a size difference within a second preset range; and obtain an original image corresponding to the obtained intermediate binary image; wherein the second suspected region is a connected region formed by first color pixels in the intermediate binary image, and the third suspected region is a connected region formed by first color pixels in the final binary image;

[0081] Calculate the peak value of the number of pixels with the same hue value in the area corresponding to the second suspected area in each obtained original image (that is, the peak value of the histogram of the hue value); calculate the average value of the hue values ​​of the pixels corresponding to all peak values, and determine that the color of the indicator light in the third suspected area is the color corresponding to the average value.

[0082] In some exemplary embodiments, when the average value is within the range of 0-10 and 156-180, the color of the indicator light within the third suspected area is determined to be red; when the average value is within the range of 35-77, the color of the indicator light within the third suspected area is determined to be green; when the average value is within the range of 100-124, the color of the indicator light within the third suspected area is determined to be blue.

[0083] The second method is to remove original images that meet invalid conditions from all original images to obtain valid images; binarize the valid images to obtain a final binary image; and determine the characteristic parameters of the indicator lights in a certain area based on the final binary image.

[0084] In some exemplary embodiments, binarizing the valid images to obtain the final binary image includes: binarizing each valid image separately to obtain a corresponding intermediate binary image; and superimposing all the intermediate binary images to obtain the final binary image.

[0085] In some exemplary embodiments, the invalidation condition includes at least one of the following: a ratio of overexposed pixels greater than a first preset threshold; a ratio of pixels with brightness less than a second preset threshold greater than a third preset threshold. In other exemplary embodiments, the invalidation condition may also be other conditions that determine that the original image of the indicator light cannot be recognized, such as a signal-to-noise ratio less than or equal to a preset signal-to-noise ratio, image jitter, etc.

[0086] In some exemplary embodiments, the overexposed pixel refers to a pixel whose brightness is greater than a fourth preset threshold.

[0087] In some exemplary embodiments, the brightness is lightness, and the V value of the pixel may be used as the brightness of the pixel.

[0088] In some exemplary embodiments, performing binarization on each valid image to obtain a corresponding intermediate binarized image includes:

[0089] For each valid image, obtain the binarized images corresponding to different target intervals; from the binarized images corresponding to all target intervals, select the binarized image with the number of first suspected regions being x; from the binarized images with the number of first suspected regions being x, select the binarized image with the middle arrangement order as the intermediate result binarized image;

[0090] Where x is the number of first suspicious regions of the binary images in the subset with the largest number of binary images among the subsets obtained by dividing the binary images corresponding to all target intervals; binary images with the same number of first suspicious regions and arranged in a continuous order are divided into the same subset;

[0091] The target interval includes: a hue value range, a saturation value range, and a lightness value range; different target intervals have the same hue value range, the same saturation value range, and different target intervals have different lightness value ranges;

[0092] The first suspected area is a connected area formed by the first color pixels in the binary image; and the binary images corresponding to all target intervals are arranged in order from large to small or from small to large according to the value range of the brightness of the target interval.

[0093] It should be noted that when the number of binary images with the number of first suspected areas being x is an odd number, the binary image with the arrangement order in the middle can be directly selected as the intermediate result binary image; when the number of binary images with the number of first suspected areas being x is an even number, any one of the two binary images with the arrangement order in the middle can be selected as the intermediate result binary image.

[0094] In some exemplary embodiments, the following method may be used to obtain a binary image corresponding to a target interval:

[0095] For each pixel in the valid image, after determining that the hue of the pixel is within the hue value range of the target interval, the saturation of the pixel is within the saturation value range of the target interval, and the brightness of the pixel is within the brightness value range of the target interval, the pixel is set to the first color; after determining that the hue of the pixel is outside the hue value range of the target interval, or the saturation of the pixel is outside the saturation value range of the target interval, or the brightness of the pixel is outside the brightness value range of the target interval, the pixel is set to the second color.

[0096] In some exemplary embodiments, the first color is white and the second color is black. In other exemplary embodiments, the first color is black and the second color is white. In other exemplary embodiments, the first color and the second color may be other colors as long as they can be distinguished from each other. The embodiments of the present disclosure do not limit the specific values ​​of these two colors.

[0097] In some exemplary embodiments, the first suspected area is an area in the binary image where an indicator light may exist.

[0098] In some exemplary embodiments, the upper limit values ​​of the brightness value ranges of different target intervals are the same, but the lower limit values ​​are different.

[0099] In some exemplary embodiments, the value range of the hue of the target interval is the value range of the hue corresponding to red, green and blue in the color space; wherein, the value range of the hue corresponding to red in the color space is: 0-10, 156-180, the value range of the hue corresponding to green in the color space is: 35-77, and the value range of the hue corresponding to blue in the color space is: 100-124.

[0100] In some exemplary embodiments, the saturation value range of the target interval is the saturation value range corresponding to red, green, and blue in the color space, that is, 43-255.

[0101] In some exemplary embodiments, the value range of the brightness of the target interval is part or all of the value range of the brightness corresponding to red, green and blue in the color space; wherein the value range of the brightness corresponding to red, green and blue in the color space is: 45-255.

[0102] In some exemplary embodiments, superimposing all intermediate binarized images to obtain a final binarized image includes:

[0103] The second suspected regions in all intermediate result binary images that are at the same position, whose shape difference is within a first preset range, and whose size difference is within a second preset range are superimposed to obtain a third suspected region at the same position in the final result binary image; wherein the second suspected region is a connected region formed by the first color pixels in the intermediate result binary image, and the third suspected region is a connected region formed by the first color pixels in the final result binary image.

[0104] In some exemplary embodiments, it is determined whether the second suspected areas in different intermediate result binary images are in the same position, whether the difference in shape is within a first preset range, whether the difference in size is within a second preset range, and the superposition method is the same as the first method mentioned above, which will not be repeated here.

[0105] In some exemplary embodiments, the characteristic parameter includes at least one of the following: number, position, and color.

[0106] In some exemplary embodiments, determining characteristic parameters of indicator lights within a certain area based on the final binary image includes:

[0107] The number of indicator lights in a certain area is determined as the number of third suspected areas in the final binary image; wherein the third suspected areas are connected areas formed by first color pixels in the final binary image.

[0108] In some exemplary embodiments, determining characteristic parameters of indicator lights within a certain area based on the final binary image includes:

[0109] The position of the indicator light in a certain area is determined as the position of the third suspected area in the final binary image; wherein the third suspected area is a connected area formed by the first color pixels in the final binary image.

[0110] In some exemplary embodiments, determining characteristic parameters of indicator lights within a certain area based on the final binary image includes:

[0111] For each third suspected region in the final binary image, obtain an intermediate binary image having a second suspected region in the same position as the third suspected region, with a shape difference within a first preset range and a size difference within a second preset range from all intermediate binary images; obtain a valid image corresponding to the obtained intermediate binary image; wherein the second suspected region is a connected region formed by first color pixels in the intermediate binary image, and the third suspected region is a connected region formed by first color pixels in the final binary image;

[0112] Calculate the peak value of the number of pixels with the same hue value in the area corresponding to the second suspected area in each obtained valid image (i.e., the peak value of the histogram of the hue value); calculate the average value of the hue values ​​of the pixels corresponding to all peak values, and determine that the color of the indicator light in the third suspected area is the color corresponding to the average value.

[0113] In some exemplary embodiments, when the average value is within the range of 0-10 and 156-180, the color of the indicator light within the third suspected area is determined to be red; when the average value is within the range of 35-77, the color of the indicator light within the third suspected area is determined to be green; when the average value is within the range of 100-124, the color of the indicator light within the third suspected area is determined to be blue.

[0114] In a second aspect, an embodiment of the present disclosure provides an electronic device, comprising:

[0115] at least one processor;

[0116] A memory stores at least one program, and when the at least one program is executed by at least one processor, the at least one processor implements any one of the above-mentioned indicator light recognition methods.

[0117] In some exemplary embodiments, the electronic device further includes:

[0118] The image acquisition module is used to capture images corresponding to different exposure times of a certain area.

[0119] It should be noted that, when the image acquisition module is shooting images corresponding to different exposure times of a certain area, the processor can first send a control instruction to the image acquisition module to set the exposure time of the image acquisition module. After setting the exposure time, the processor controls the image acquisition module to capture the image corresponding to the exposure time; then repeat the above steps until the images corresponding to all exposure times are captured; wherein the exposure time set each time is different.

[0120] In some exemplary embodiments, the electronic device further includes:

[0121] The display module is used to display characteristic parameters of the identified indicator light.

[0122] In some exemplary embodiments, the electronic device further includes:

[0123] The display module is used to display the indicator light at the position of the identified indicator light, and the color of the displayed indicator light is the color of the identified indicator light.

[0124] Among them, the processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the display module can be a display.

[0125] In some embodiments, the processor, memory, display module, and image acquisition module are connected to each other via a bus, and further connected to other components of the computing device.

[0126] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned indicator light recognition methods when the program is executed by a processor.

[0127] Figure 2 The present invention is a block diagram of a device for identifying an indicator light according to an embodiment of the present invention.

[0128] Fourthly, refer to Figure 2 , an embodiment of the present disclosure provides an indicator light recognition device, comprising:

[0129] Image acquisition module 201, used to acquire original images corresponding to different exposure times of a certain area;

[0130] The indicator light recognition module 202 is used to perform binarization processing on the original image to obtain a final binary image; and determine the characteristic parameters of the indicator lights in a certain area based on the final binary image.

[0131] In some exemplary embodiments, the indicator light recognition module 202 is specifically configured to perform binarization processing on the original image to obtain a final binary image using the following method:

[0132] For each original image, obtain binarized images corresponding to different target intervals; select a binarized image with x number of first suspected regions from the binarized images corresponding to all target intervals; and select a binarized image with the middle arrangement order from the binarized images with x number of first suspected regions as an intermediate result binarized image;

[0133] Wherein, x is the number of first suspected regions of the binary images in the subset containing the largest number of binary images among the subsets obtained by dividing the binary images corresponding to all target intervals; wherein, the binary images having the same number of first suspected regions and a continuous arrangement order are divided into the same subset.

[0134] In some exemplary embodiments, the target interval includes: a hue value range, a saturation value range, and a lightness value range; different target intervals have the same hue value range, the same saturation value range, and different target intervals have different lightness value ranges;

[0135] The first suspected area is a connected area formed by the first color pixels in the binary image; and the binary images corresponding to all target intervals are arranged in order from large to small or from small to large according to the value range of the brightness of the target interval.

[0136] In some exemplary embodiments, the upper limit values ​​of the brightness value ranges of different target intervals are the same, but the lower limit values ​​are different.

[0137] In some exemplary embodiments,

[0138] The hue value range of the target interval is the hue value range corresponding to red, green and blue in the color space;

[0139] The saturation value range of the target interval is the saturation value range corresponding to red, green and blue in the color space;

[0140] The value range of the brightness of the target interval is part or all of the value range of the brightness corresponding to red, green and blue in the color space.

[0141] In some exemplary embodiments, the indicator light recognition module 202 is specifically configured to superimpose all intermediate binary images to obtain a final binary image in the following manner:

[0142] The second suspected regions in all intermediate result binary images that are at the same position, whose shape difference is within a first preset range, and whose size difference is within a second preset range are superimposed to obtain a third suspected region at the same position in the final result binary image; wherein the second suspected region is a connected region formed by the first color pixels in the intermediate result binary image, and the third suspected region is a connected region formed by the first color pixels in the final result binary image.

[0143] In some exemplary embodiments, the characteristic parameter includes at least one of the following: number, position, and color.

[0144] In some exemplary embodiments, the indicator light recognition module 202 is specifically configured to determine characteristic parameters of the indicator lights within a certain area based on the final binary image using the following method:

[0145] The number of indicator lights in a certain area is determined as the number of third suspected areas in the final binary image; wherein the third suspected areas are connected areas formed by first color pixels in the final binary image.

[0146] In some exemplary embodiments, the indicator light recognition module 202 is specifically configured to determine characteristic parameters of the indicator lights within a certain area based on the final binary image using the following method:

[0147] The position of the indicator light in a certain area is determined as the position of the third suspected area in the final binary image; wherein the third suspected area is a connected area formed by the first color pixels in the final binary image.

[0148] In some exemplary embodiments, the indicator light recognition module 202 is specifically configured to determine characteristic parameters of the indicator lights within a certain area based on the final binary image using the following method:

[0149] For each third suspected area in the final result binary image, obtain an intermediate result binary image from all intermediate result binary images, which has a second suspected area in the same position as the third suspected area, with a shape difference within a first preset range and a size difference within a second preset range; obtain a valid image corresponding to the obtained intermediate result binary image; wherein the second suspected area is a connected area formed by the first color pixels in the intermediate result binary image, and the third suspected area is a connected area formed by the first color pixels in the final result binary image; calculate the peak value of the number of pixels with the same hue value in the area corresponding to the second suspected area in each obtained valid image (that is, the peak value of the histogram of the hue value); calculate the average value of the hue values ​​of the pixels corresponding to all peak values, and determine that the color of the indicator light in the third suspected area is the color corresponding to the average value.

[0150] In some exemplary embodiments, the indicator light recognition module 202 is specifically configured to:

[0151] Eliminate the original image that meets the invalid condition from the original image to obtain a valid image; perform binarization processing on the original image to obtain a final binary image; and determine the characteristic parameters of the indicator light in a certain area based on the final binary image.

[0152] In some exemplary embodiments, the invalidation condition includes at least one of the following: a ratio of overexposed pixels is greater than a first preset threshold; a ratio of pixels with brightness less than a second preset threshold is greater than a third preset threshold.

[0153] In some exemplary embodiments, the present invention further comprises:

[0154] The image acquisition module 203 is used to capture images corresponding to different exposure times of a certain area.

[0155] In some exemplary embodiments, the present invention further comprises:

[0156] The display module 204 is configured to display characteristic parameters of the identified indicator light.

[0157] In some exemplary embodiments, the present invention further comprises:

[0158] The display module 204 is configured to display the indicator light at the position of the identified indicator light, and the color of the displayed indicator light is the color of the identified indicator light.

[0159] In some exemplary embodiments, the present invention further comprises:

[0160] The installation adjustment module 205 is used to install and fix the image acquisition module 203 .

[0161] In some other exemplary embodiments, the installation adjustment module 205 is further used to adjust the relative position between the image acquisition module 203 and a certain area.

[0162] The specific implementation process of the above-mentioned indicator light recognition device is the same as the specific implementation process of the indicator light recognition method in the above-mentioned embodiment, and will not be repeated here.

[0163] Figure 3 The present invention is a block diagram of an indicator light identification system according to an embodiment of the present invention.

[0164] Fifth, refer to Figure 3 , an embodiment of the present disclosure provides an indicator light recognition system, comprising:

[0165] Image acquisition device 301, used to capture original images corresponding to different exposure times of a certain area;

[0166] The indicator light recognition device 302 is used to obtain original images corresponding to different exposure times of a certain area; binarize each obtained original image to obtain a corresponding intermediate result binarized image; superimpose all the intermediate result binarized images to obtain a final result binarized image; and determine the characteristic parameters of the indicator lights in a certain area based on the final result binarized image.

[0167] In some exemplary embodiments, the image acquisition device 301 and the indicator light recognition device 302 are provided in the same device.

[0168] In some exemplary embodiments, the indicator light recognition device 302 is specifically used to:

[0169] From the obtained original images, original images that meet the invalid conditions are eliminated to obtain valid images; each valid image is binarized to obtain a corresponding intermediate binary image; all intermediate binary images are superimposed to obtain a final binary image; and characteristic parameters of indicator lights in a certain area are determined based on the final binary image.

[0170] In some exemplary embodiments, the invalidation condition includes at least one of the following: a ratio of overexposed pixels is greater than a first preset threshold; a ratio of pixels with brightness less than a second preset threshold is greater than a third preset threshold.

[0171] In some exemplary embodiments, the indicator light recognition device 302 is specifically configured to implement binarization processing on each valid image to obtain a corresponding intermediate binary image in the following manner:

[0172] For each valid image, obtain the binarized images corresponding to different target intervals; from the binarized images corresponding to all target intervals, select the binarized image with the number of first suspected regions being x; from the binarized images with the number of first suspected regions being x, select the binarized image with the middle arrangement order as the intermediate result binarized image;

[0173] Where x is the number of first suspicious regions of the binary images in the subset with the largest number of binary images among the subsets obtained by dividing the binary images corresponding to all target intervals; wherein, the number of first suspicious regions of all binary images in the same subset is the same and the arrangement order is continuous;

[0174] The target interval includes: a hue value range, a saturation value range, and a lightness value range; different target intervals have the same hue value range, the same saturation value range, and different target intervals have different lightness value ranges;

[0175] The first suspected area is a connected area formed by the first color pixels in the binary image; and the binary images corresponding to all target intervals are arranged in order from large to small or from small to large according to the value range of the brightness of the target interval.

[0176] In some exemplary embodiments, the upper limit values ​​of the brightness value ranges of different target intervals are the same, but the lower limit values ​​are different.

[0177] In some exemplary embodiments, the value range of the hue of the target interval is the value range of the hue corresponding to red, green, and blue in the color space;

[0178] The saturation value range of the target interval is the saturation value range corresponding to red, green and blue in the color space;

[0179] The value range of the brightness of the target interval is part or all of the value range of the brightness corresponding to red, green and blue in the color space.

[0180] In some exemplary embodiments, the indicator light recognition device 302 is specifically configured to superimpose all intermediate binary images to obtain a final binary image in the following manner:

[0181] The second suspected regions in all intermediate result binary images that are at the same position, whose shape difference is within a first preset range, and whose size difference is within a second preset range are superimposed to obtain a third suspected region at the same position in the final result binary image; wherein the second suspected region is a connected region formed by the first color pixels in the intermediate result binary image, and the third suspected region is a connected region formed by the first color pixels in the final result binary image.

[0182] In some exemplary embodiments, the characteristic parameter includes at least one of the following: number, position, and color.

[0183] In some exemplary embodiments, the indicator light recognition device 302 is specifically configured to determine characteristic parameters of an indicator light within a certain area based on the final binary image using the following method:

[0184] The number of indicator lights in a certain area is determined as the number of third suspected areas in the final binary image; wherein the third suspected areas are connected areas formed by first color pixels in the final binary image.

[0185] In some exemplary embodiments, the indicator light recognition device 302 is specifically configured to determine characteristic parameters of an indicator light within a certain area based on the final binary image using the following method:

[0186] The position of the indicator light in a certain area is determined as the position of the third suspected area in the final binary image; wherein the third suspected area is a connected area formed by the first color pixels in the final binary image.

[0187] In some exemplary embodiments, the indicator light recognition device 302 is specifically configured to determine characteristic parameters of an indicator light within a certain area based on the final binary image using the following method:

[0188] For each third suspected area in the final result binary image, obtain an intermediate result binary image from all intermediate result binary images, which has a second suspected area in the same position as the third suspected area, with a shape difference within a first preset range and a size difference within a second preset range; obtain a valid image corresponding to the obtained intermediate result binary image; wherein the second suspected area is a connected area formed by the first color pixels in the intermediate result binary image, and the third suspected area is a connected area formed by the first color pixels in the final result binary image; calculate the peak value of the number of pixels with the same hue value in the area corresponding to the second suspected area in each obtained valid image (i.e., the peak value of the histogram of the hue value); calculate the average value of the hue values ​​of the pixels corresponding to all peak values, and determine that the color of the indicator light in the third suspected area is the color corresponding to the average value.

[0189] In some exemplary embodiments, the present invention further comprises:

[0190] The display device 303 is used to display the characteristic parameters of the identified indicator light.

[0191] In some exemplary embodiments, the present invention further comprises:

[0192] The display device 303 is used to display the indicator light at the position of the identified indicator light, and the color of the displayed indicator light is the color of the identified indicator light.

[0193] In some exemplary embodiments, the present invention further comprises:

[0194] The installation adjustment device 304 is used to install and fix the image acquisition device 301.

[0195] In some other exemplary embodiments, the installation adjustment device 304 is further used to adjust the relative position between the image acquisition device 301 and a certain area.

[0196] The specific implementation process of the above indicator light recognition system is the same as the specific implementation process of the indicator light recognition method in the above embodiment, and will not be repeated here.

[0197] Several examples are listed below to describe in detail the indicator light identification method of the embodiment of the present disclosure. The examples listed are only for the convenience of explanation and are not used to limit the protection scope of the embodiment of the present disclosure.

[0198] Example 1

[0199] This example describes the application scenario of identifying indicators on a chassis.

[0200] Figure 4 This is a schematic diagram of identifying the indicator lights on the chassis provided in Example 1 of the embodiment of the present disclosure. Figure 4As shown, in this example, the indicator light recognition system includes: an indicator light recognition device 403 and an installation and adjustment device.

[0201] The indicator light recognition device 403 is equipped with an industrial camera.

[0202] The mounting and adjustment device includes a mounting base 401, a connecting rod 402 connected to the mounting base 401, and a push rod 404 connected to the connecting rod 402. The mounting and adjustment device secures the indicator light recognition device 403 to the frame being identified. The indicator light recognition device 403 is rotatable about the push rod 404, while the mounting base 401 remains stationary. By adjusting the connecting rod 402, the push rod 404, and the industrial camera in the indicator light recognition device 403, the captured image's angle and field of view can be adjusted, thereby adjusting the position of the identified indicator light in the image.

[0203] The indicator light recognition device 403 can be connected to a display.

[0204] The following describes the method for the indicator light identification system to identify the indicator lights on the chassis. Figure 5 As shown, the method includes:

[0205] 1. Obtain the original image corresponding to the exposure time sequence; wherein the exposure time sequence is a sequence including different exposure times.

[0206] The exposure time sequence consists of 100 equally spaced values ​​ranging from 10ms to 1000ms, i.e., 10ms, 20ms, ..., 1000ms. The exposure time of the industrial camera is then set to 10ms, 20ms, ..., 1000ms, and the corresponding raw images a1, a2, ..., a100 are acquired in sequence.

[0207] It should be noted that each time the exposure time is set, the corresponding original image is collected; and then the next exposure time is set.

[0208] 2. Eliminate the original images with too high brightness or too low brightness from the collected original images to obtain valid images.

[0209] Among them, through the preset first preset threshold of 70% and the third preset threshold of 30%, the original images in which the number of overexposed pixels in images a1, a2, ..., a100 is greater than 70% of the total number of pixels, and the original images in which the number of pixels with brightness less than the second preset threshold is greater than 30% of the total number of pixels are eliminated, and the remaining images p1, p2, ..., p51 are obtained. The remaining images p1, p2, ..., p51 are valid images.

[0210] 3. Preset HSV value range.

[0211] First, the color range of standard red, standard green, and standard blue in the HSV color space is used as the target range, and the target range is converted into the upper and lower limits of the H value h maxr1 =10,h minr1 =0,h maxr2 =180,h minr2 =156,h maxg =77,h ming =35,h maxb =124,h minb =100 and the upper and lower limits of S value max =255, S min =43.

[0212] Secondly, set the lower limit of the V value target range from 45 to 245 and divide it into 10 intervals, that is, v min1 =45,v min2 =55,...,v min21 =245, a total of 21, and the upper limit of the target range v max = 255. Therefore, there are 21 V value target intervals, namely 45~255, 55~255, ..., 245~255.

[0213] 4. Let i = 1, that is, select a valid image in sequence.

[0214] 5. Let j = 1, that is, select a range of V values ​​in sequence.

[0215] 6. Select v minj Then, we can get the upper and lower limits of H, S, and V. maxr1 、h minr1 、h maxr2 、h minr2 、h maxg 、h ming 、h maxb 、h minb 、s max 、s min 、v max 、v minj .

[0216] 7. Determine the valid image p i Are all pixels within the target range to obtain a valid image p? i The binary image b corresponding to the j-th V value range ij . Specifically including:

[0217] 71. Select valid images p in order i A pixel in the .

[0218] 72. Determine whether the HSV value of a pixel is within the target range. If the HSV value of the pixel is within the target range, that is, h minr1 < Hue value < h maxr1 , or h minr2 < Hue value < h maxr2 , or h ming < Hue value < h maxg , or h minb < Hue value < h maxb ; and s min < Saturation value < s max , v minj < Value value < v max , then execute step 73; if the HSV value of the pixel is not within the target range, that is, h maxr1 ≤ Hue value ≤ h ming , or h maxg ≤ Hue value ≤ h minb , or h maxb ≤ Hue value ≤ h minr2 ; and Saturation value ≤ s min , or Saturation value ≥ s max ; and Value value ≤ v minj , or Value value ≥ v max [[ID=(-1)]] [[ID=(-2)]]

[0219] 73. Set the pixel in the valid image p i to white.

[0220] 74. Set the pixel in the valid image p i to black. <0)00055())

[0221] 75. Determine whether all pixels of the valid image p i have been processed. If there are unprocessed pixels, return to step 71 to continue execution; if all pixels have been processed, obtain the binary image b i corresponding to the value range of the j-th V value of the valid image p ij .

[0222] 8. Let j = j + 1. If j > 21, jump to step 9; if j ≤ 21, jump to step 6. <000)()555())9. Select the intermediate result binary image.

[0224] For the image p i , after 21 operations, obtain the binary image b i1 , b i2 ,..., b i21 , and count the binary images b i1 , b i2 ,..., b i21 It should be noted that there are some unclear or potentially incorrect tags in the original text (such as ,

[0219] , ,

[0221] , ,

[0222] , ,

[0223] , ,

[0224] which seem to be used in an unusual way). The translation is done as accurately as possible based on the provided rules.The number of the first suspected regions is c i1 ,c i2 ,...,c i21 Find c i1 ,c i2 ,...,c i21 c with the same median and continuous order ij Among the numbers, the largest number corresponds to c ij is x i , then select the first suspected area whose number is equal to x i The binary image d with the middle arrangement number among all the binary images i , as a valid image p i The corresponding intermediate binary image is as follows: Figure 6 shown.

[0225] For example, c i1 ,c i2 ,...,c i21 They are: 0, 0, 2, 2, 5, 5, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 8, 8, 12, 13. The largest number of values ​​with the same value and consecutive order is from 7 to 13. So x i is equal to 8, so the number of the first suspected area is equal to x i All the binary images of are the binary images corresponding to the 7th to 13th values, as well as the 18th and 19th values. The binary image d with the sequence number in the middle is i This is the binary image corresponding to the 11th value.

[0226] 10. Let i = i + 1. If i > 51, jump to step 11. If i ≤ 51, jump to step 5.

[0227] 11. Superimpose the intermediate binary images to obtain the final binary image.

[0228] Among them, the intermediate result binary images d1, d2, ..., d 51 The CCP contains x1+x2+...+x 51 The positions of these second suspected areas are partially overlapped. These second suspected areas are screened, and the second suspected areas at the same position with basically the same shape and size are retained. The second suspected areas at the position with large differences in shape or size are eliminated, and then the remaining second suspected areas are superimposed to obtain the final binary image u.

[0229] 12. Determine the location and number of indicator lights.

[0230] The third suspected area in the final binary image u is the confirmed area z1, z2, ..., z2 where the indicator light is located. 39 , the number of identified indicator lights is 39, and the position of the third suspected area is determined to be the position of the indicator light.

[0231] 13. Determine the indicator light color.

[0232] Among them, select valid images p1, p2, ..., p 51 All images in the determined area z1 are identified, and the peak values ​​of the histogram of H values ​​of all pixels in the determined area z1 in these valid images are calculated respectively, and then the average value of these peak values ​​is obtained to obtain the value h1. 39 After calculation, we get h1,h2,...h 39 , these values ​​are the color values ​​of the corresponding indicator lights.

[0233] 14. Output the recognition results.

[0234] Among them, the number, position and color of the identified indicator lights are output.

[0235] Example 2

[0236] Figure 7 This is a schematic diagram of identifying the product indicator lights on the assembly line provided in Example 2 of the embodiment of the present disclosure. Figure 7 As shown, a product 703 to be identified is placed on a carrier plate 704 on a conveyor belt of an assembly line 705. An indicator light recognition device 701 is placed next to the assembly line 705, and an industrial camera 702 is mounted on the indicator light recognition device 701. When the product to be identified moves under the industrial camera 702, it pauses for a period of time to perform image acquisition and indicator light recognition operations.

[0237] The indicator light identification process of this example is the same as that of Example 1 and will not be described here.

[0238] Example 3

[0239] This example describes installing a light indicator recognition device on a car, pointing it toward the upper front of the car's direction of travel. When the car drives in front of a traffic light, the device identifies the color, position, and number of the traffic lights ahead.

[0240] The indicator light identification process of this example is the same as that of Example 1 and will not be described here.

[0241] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0242] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A method for identifying an indicator light, comprising: Obtain the original images corresponding to different exposure times of a certain area; Each of the original images is binarized to obtain a final binary image, wherein the binarization of each of the original images to obtain the final binary image includes binarizing each of the original images to obtain a corresponding intermediate binary image, and superimposing all the intermediate binary images to obtain the final binary image. The superposition of all the intermediate binary images to obtain the final binary image includes superimposing second suspected regions in all the intermediate binary images that are at the same position, have a shape difference within a first preset range, and a size difference within a second preset range to obtain a third suspected region at the same position in the final binary image; wherein the second suspected region is a connected region formed by first color pixels in the intermediate binary images, and the third suspected region is a connected region formed by first color pixels in the final binary image; Determine characteristic parameters of indicator lights in a certain area based on the final binary image, wherein the characteristic parameters include at least one of number, position, and color.

2. The method according to claim 1, wherein The binarization processing of each original image to obtain a corresponding intermediate binary image comprises: For each of the original images, obtaining binarized images corresponding to different target intervals; selecting a binarized image with x number of first suspected regions from the binarized images corresponding to all the target intervals; and selecting a binarized image with an arrangement order in the middle among the binarized images with x number of first suspected regions as the intermediate result binarized image; Wherein, x is the number of first suspected regions of the binary image in the subset with the largest number of binary images among the subsets obtained by dividing the binary images corresponding to all the target intervals; wherein, the binary images with the same number of first suspected regions and a continuous arrangement order are divided into the same subset.

3. The method according to claim 2, wherein: The target interval includes: a hue value range, a saturation value range, and a lightness value range; different target intervals have the same hue value range, the same saturation value range, and different target intervals have different lightness value ranges; Among them, the first suspected area is a connected area formed by the first color pixels in the binary image; the binary images corresponding to all the target intervals are arranged in order from large to small or from small to large according to the value range of the brightness of the target interval.

4. The method according to claim 3, wherein: The upper limit values ​​of the value ranges of the brightness of different target intervals are the same, but the lower limit values ​​are different.

5. The method according to claim 3, wherein The value range of the hue of the target interval is the value range of the hue corresponding to red, green and blue in the color space; The saturation value range of the target interval is the saturation value range corresponding to red, green and blue in the color space; The value range of the brightness of the target interval is part or all of the value range of the brightness corresponding to red, green and blue in the color space.

6. The method according to any one of claims 1 to 4, wherein the characteristic parameters include: The method of determining characteristic parameters of indicator lights in a certain area according to the final binary image includes: The number of indicator lights in the certain area is determined as the number of third suspected areas in the final binary image; wherein the third suspected areas are connected areas formed by first color pixels in the final binary image.

7. The method according to any one of claims 1 to 4, wherein the characteristic parameters include: Position, wherein determining characteristic parameters of indicator lights within a certain area based on the final binary image includes: The position of the indicator light in the certain area is determined as the position of the third suspected area in the final result binary image; wherein the third suspected area is a connected area formed by the first color pixels in the final result binary image.

8. The method according to any one of claims 1 to 4, wherein the characteristic parameters include: Color, wherein determining characteristic parameters of indicator lights within a certain area based on the final binary image includes: For each third suspected region in the final binary image, obtain, from all the intermediate binary images, an intermediate binary image having a second suspected region that is located at the same position as the third suspected region, differs in shape within a first preset range, and differs in size within a second preset range; and obtain a valid image corresponding to the obtained intermediate binary image; wherein the second suspected region is a connected region formed by first color pixels in the intermediate binary image, and the third suspected region is a connected region formed by first color pixels in the final binary image; Calculate the peak value of the number of pixels with the same hue value in the area corresponding to the second suspected area in each obtained valid image; calculate the average value of the hue values ​​of the pixels corresponding to all peak values, and determine that the color of the indicator light in the third suspected area is the color corresponding to the average value.

9. The method according to any one of claims 1 to 4, further comprising: before binarizing each of the original images to obtain a final binarized image; Eliminating original images that meet invalid conditions from the original images to obtain valid images; The binarization process of each original image to obtain a final binarized image includes: The effective image is binarized to obtain a final binarized image.

10. The method according to claim 9, wherein: The invalidation condition includes at least one of the following: the proportion of overexposed pixels is greater than a first preset threshold; the proportion of pixels with brightness less than a second preset threshold is greater than a third preset threshold.

11. An electronic device comprising: at least one processor; A memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the indicator light recognition method according to any one of claims 1-10.

12. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for identifying an indicator light according to any one of claims 1 to 10 is implemented.

13. An indicator light recognition system, comprising: An image acquisition device, used to capture original images corresponding to different exposure times of a certain area; An indicator light recognition device is configured to obtain original images corresponding to different exposure times of a certain area; perform binarization processing on each of the original images to obtain a final binary image; and determine characteristic parameters of the indicator lights in a certain area based on the final binary image, wherein the characteristic parameters include at least one of number, position, and color. The binarization process is performed on each of the original images to obtain a final binarized image, comprising: performing binarization on each of the original images to obtain a corresponding intermediate binarized image, and superimposing all the intermediate binarized images to obtain a final binarized image. The superposition of all the intermediate result binary images to obtain the final result binary image includes superimposing the second suspected areas in all the intermediate result binary images that are at the same position, have a shape difference within a first preset range, and a size difference within a second preset range to obtain a third suspected area at the same position in the final result binary image; wherein the second suspected area is a connected area formed by the first color pixels in the intermediate result binary image, and the third suspected area is a connected area formed by the first color pixels in the final result binary image.

Citation Information

Patent Citations

  • Object recognition method, object recognition device and classifier training method

    CN107305635A

  • Red light signal detection method based on image processing technology

    CN107563301A

  • Image binarization method and device, electronic device and storage medium

    CN109325497A

  • Image processing method and device, electronic device and computer readable medium

    CN110222694A

  • Image processing device, imaging apparatus and image processing program

    JP2008228181A