Electronic product lamp sequence identification method and device, equipment and storage medium
By drawing and adjusting the histogram of the light sequence acquisition image of the electronic product, identifying the lights on, off and background colors, the misidentification problems caused by ambient light changes are solved, and the accuracy of light sequence recognition of the electronic product is improved.
Patent Information
- Application Number
- CN202411376449.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-20
AI Technical Summary
Existing electronic products lamp sequence recognition methods are prone to misidentification under changing ambient light, resulting in inaccurate lamp sequence recognition.
By obtaining the light sequence acquisition images of the electronic product to be identified, drawing a histogram to obtain a color histogram, adjusting the image to an identified image including the light color, the light color and the background color, and identifying them based on these colors, considering the changing environment Light influences to improve recognition accuracy.
In changing ambient light, the phenomenon of misidentification is greatly reduced and the accuracy of lamp sequence recognition of electronic products is improved.
Smart Images

Figure CN119169312A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for identifying a light sequence of an electronic product. Background Art
[0002] At present, there are indicator lights on the surface of electronic products to indicate the working status of each product of the electronic products. The light-on and light-off combination sequence of the indicator lights indicating the working status of the product is the light sequence of the electronic product; therefore, the light sequence recognition of the electronic product is very important for the product working status recognition of the electronic product.
[0003] In the related art, the light sequence recognition method of electronic products refers to: collecting the light sequence image of the electronic product, identifying the on and off of the indicator lights in the light sequence image through the light on and off threshold, and obtaining the light sequence status of the electronic product.
[0004] However, the environment where the electronic product is located may have changing ambient light. The above method uses the on / off threshold to identify the indicator lights in the light sequence image, which is prone to misidentification under changing ambient light conditions, resulting in inaccurate light sequence recognition of the electronic product. Summary of the invention
[0005] In view of this, embodiments of the present application provide a method, device, equipment and storage medium for identifying a light sequence of an electronic product, so as to improve the accuracy of identifying a light sequence of the electronic product.
[0006] On the one hand, an embodiment of the present application provides a method for identifying a light sequence of an electronic product, the method comprising:
[0007] Acquire a light sequence acquisition image of the electronic product to be identified;
[0008] Performing a histogram drawing on the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image;
[0009] Performing color adjustment on the light sequence acquisition image according to the color statistics result of the color histogram to obtain a light sequence recognition image of the light sequence acquisition image; the light sequence recognition image includes a light on color, a light off color and a background color;
[0010] The light sequence state of the light sequence recognition image is recognized according to the light-on color, the light-off color and the background color to obtain the light sequence recognition state of the electronic product to be recognized.
[0011] Optionally, performing image adjustment on the light sequence acquisition image according to the color statistics result of the color histogram to obtain the light sequence recognition image includes:
[0012] Determine the light-on color, the light-off color, and the background color according to the color statistics result of the color histogram;
[0013] The light sequence acquisition image is color-adjusted according to the light-on color, the light-off color and the background color to obtain the light sequence recognition image.
[0014] Optionally, the performing light sequence state recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain the light sequence recognition state of the electronic product to be recognized includes:
[0015] Performing light sequence state recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain light on information and light off information of the electronic product to be recognized;
[0016] The light sequence recognition state is determined according to the light-on information and the light-off information.
[0017] Optionally, the performing light sequence state recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain the light on information and light off information of the electronic product to be recognized includes:
[0018] The light sequence state of the light sequence recognition image is recognized according to the background pattern corresponding to the light on color, the light off color and the background color to obtain the light on information and the light off information; the background pattern is used to represent a bright background or a dark background.
[0019] Optionally, the lighting information includes the number of lights on and the positions of lights on; the lighting off information includes the number of lights off and the positions of lights off.
[0020] Optionally, the step of acquiring a light sequence acquisition image of the electronic product to be identified includes:
[0021] A light sequence acquisition image of the electronic product to be identified is obtained from a camera; the camera is connected to a fixed bracket, and the fixed bracket is connected to a light sequence identification device of the light sequence identification method through a communication cable.
[0022] Optionally, the method further includes:
[0023] The product working status of the electronic product to be identified is determined according to the light sequence identification status.
[0024] On the other hand, an embodiment of the present application provides a light sequence recognition device for an electronic product, the device comprising: an acquisition unit, a drawing unit, an adjustment unit, and a recognition unit;
[0025] The acquisition unit is used to acquire a light sequence acquisition image of the electronic product to be identified;
[0026] The drawing unit is used to draw a histogram of the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image;
[0027] The adjustment unit is used to perform color adjustment on the light sequence acquisition image according to the color statistics result of the color histogram to obtain a light sequence recognition image of the light sequence acquisition image; the light sequence recognition image includes a light on color, a light off color and a background color;
[0028] The recognition unit is used to perform light sequence status recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain the light sequence recognition status of the electronic product to be recognized.
[0029] Optionally, adjustment unit for:
[0030] According to the color statistics result of the color histogram, determine the light color, light off color and background color;
[0031] The light sequence acquisition image is color-adjusted according to the light on color, light off color and background color to obtain a light sequence recognition image.
[0032] Optionally, an identification unit for:
[0033] The light sequence recognition image is used to recognize the light sequence state according to the light on color, light off color and background color, and the light on information and light off information of the electronic product to be recognized are obtained;
[0034] According to the lighting information and the lighting off information, the lighting sequence recognition status is determined.
[0035] Optionally, an identification unit for:
[0036] The light sequence recognition image is subjected to light sequence state recognition according to the background pattern corresponding to the light on color, light off color and background color to obtain light on information and light off information; the background pattern is used to represent a bright background or a dark background.
[0037] Optionally, the lighting information includes the number of lights on and the positions of lights on; the lighting information includes the number of lights off and the positions of lights off.
[0038] Optionally, get unit, used to:
[0039] A light sequence acquisition image of an electronic product to be identified is obtained from a camera; the camera is connected to a fixed bracket, and the fixed bracket is connected to a light sequence identification device of a light sequence identification method through a communication cable.
[0040] Optionally, the device further includes: a determination unit;
[0041] The determination unit is used to determine the product working state of the electronic product to be identified according to the light sequence recognition state.
[0042] On the other hand, an embodiment of the present application provides a light sequence recognition device, the light sequence recognition device comprising a processor and a memory:
[0043] The memory is used to store a computer program and transmit the computer program to the processor;
[0044] The processor is configured to execute the method described in the above aspects according to the instructions in the computer program.
[0045] On the other hand, an embodiment of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, and the computer program is used to implement the method described in the above aspects when executed by a processor.
[0046] Compared with the prior art, this application has at least the following advantages:
[0047] According to the technical solution of the embodiment of the present application, first, a light sequence acquisition image of the electronic product to be identified is obtained; a histogram of the light sequence acquisition image is drawn to obtain a color histogram of the light sequence acquisition image; the light sequence acquisition image is adjusted to a light sequence recognition image according to the color statistics result of the color histogram, so that the light sequence recognition image includes the light on color, the light off color and the background color; this method takes into account the influence of the changing ambient light on the light sequence acquisition image of the electronic product to be identified, and clarifies the distribution of each color in the light sequence acquisition image by drawing the color histogram of the light sequence acquisition image, so as to adjust the light sequence acquisition image to a light sequence recognition image including the light on color, the light off color and the background color, and on the basis of paying attention to the light on color and the light off color, further attention is paid to the background color affected by the changing ambient light. Then, according to the light on color, light off color and background color, the light sequence state of the light sequence recognition image is identified to obtain the light sequence recognition state of the electronic product to be identified; when identifying the light sequence of the electronic product to be identified, this method identifies the light on color and the light off color on the basis of considering the background color affected by the changing ambient light, and can more accurately identify the light on and the light off, greatly reducing the phenomenon of misidentification, thereby improving the light sequence recognition accuracy of electronic products. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 A schematic diagram of a system framework involved in an application scenario in an embodiment of the present application;
[0050] Figure 2 A schematic diagram of a flow chart of a light sequence recognition method for an electronic product provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of a light sequence recognition scenario for an electronic product provided in an embodiment of the present application;
[0052] Figure 4 A flowchart of a method for identifying the working status of an electronic product provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of the structure of a light sequence recognition device for an electronic product provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] The light sequence of an electronic product refers to the combination of lights on and off on the indicator lights on the surface of the electronic product to indicate the working status of the product. In order to identify the working status of the electronic product, it is necessary to identify the light sequence of the electronic product. At present, the light sequence recognition method of electronic products refers to: collecting the light sequence image of the electronic product, and identifying the lights on and off of the indicator lights in the light sequence image through the light on and off threshold to obtain the light sequence status of the electronic product.
[0056] However, the inventors have discovered through research that the environment in which the electronic product is located may have changing ambient light. The above method uses the on / off threshold to identify the indicator lights in the light sequence image, which is prone to misidentification under changing ambient light conditions, resulting in inaccurate light sequence recognition of the electronic product.
[0057] In order to solve this problem, in an embodiment of the present application, a light sequence acquisition image of an electronic product to be identified is obtained; a histogram of the light sequence acquisition image is drawn to obtain a color histogram of the light sequence acquisition image; the light sequence acquisition image is adjusted to a light sequence recognition image according to the color statistics result of the color histogram, so that the light sequence recognition image includes a light on color, a light off color and a background color; this method takes into account the influence of changing ambient light on the light sequence acquisition image of the electronic product to be identified, and by drawing a color histogram of the light sequence acquisition image, the distribution of each color in the light sequence acquisition image is clarified to adjust the light sequence acquisition image to a light sequence recognition image including a light on color, a light off color and a background color, and on the basis of paying attention to the light on color and the light off color, further attention is paid to the background color affected by the changing ambient light; according to the light on color, the light off color and the background color, the light sequence state of the light sequence recognition image is identified to obtain the light sequence recognition state of the electronic product to be identified; when identifying the light sequence of the electronic product to be identified, this method identifies the light on color and the light off color on the basis of considering the background color affected by the changing ambient light, and can more accurately identify the light on and the light off, greatly reducing the misidentification phenomenon, thereby improving the light sequence recognition accuracy of the electronic product.
[0058] For example, one of the scenarios of the embodiment of the present application may be applied to Figure 1 The scene includes an electronic product 101 to be identified and a light sequence recognition device 102, which is used to execute the implementation method provided in the embodiment of the present application to obtain the light sequence recognition state of the electronic product 101 to be identified, so as to determine the product working state of the electronic product 101 to be identified.
[0059] First, in the above application scenario, although the action description of the implementation method provided in the embodiment of the present application is executed by the light sequence recognition device 102; however, the embodiment of the present application is not limited in terms of the execution subject, as long as the actions disclosed in the implementation method provided in the embodiment of the present application are executed.
[0060] Secondly, the above scenario is only an example scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
[0061] The specific implementation of the light sequence recognition method, device, equipment and storage medium for electronic products in the embodiments of the present application will be described in detail below with reference to the accompanying drawings through embodiments.
[0062] First, the specific implementation of the light sequence recognition method of the electronic product in the embodiment of the present application is described in detail through an embodiment.
[0063] See also Figure 2 , Figure 2 A flowchart of a method for identifying a light sequence of an electronic product provided in an embodiment of the present application is provided. In this embodiment, the method may include the following steps:
[0064] S201: Acquire a light sequence acquisition image of an electronic product to be identified.
[0065] In the embodiment of the present application, in order to realize light sequence recognition of the electronic product to be identified so as to realize product working status recognition of the electronic product to be identified, it is first necessary to obtain a light sequence acquisition image of the electronic product to be identified.
[0066] The electronic product to be identified refers to an electronic product with a light sequence to be identified; the light sequence acquisition image refers to an image of the light-on and light-off combination sequence of the indicator lights of the electronic product to be identified captured by the camera.
[0067] The above S201 acquires the light sequence acquisition image of the electronic product to be identified, which can represent the information of the light-on and light-off combination sequence of the indicator lights of the electronic product to be identified in the form of an image, and provides basic image information for subsequent identification of the light sequence of the electronic product to be identified.
[0068] S202: Draw a histogram of the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image.
[0069] S203: performing color adjustment on the light sequence acquisition image according to the color statistics result of the color histogram to obtain a light sequence recognition image of the light sequence acquisition image; the light sequence recognition image includes a light on color, a light off color and a background color.
[0070] In the related art, after obtaining the light sequence acquisition image of the electronic product to be identified, the indicator lights in the light sequence acquisition image are identified by using the light on and off threshold to obtain the light sequence recognition status of the electronic product to be identified; however, the environment where the electronic product to be identified is likely to have changing ambient light, and the above method uses the light on and off threshold to identify the indicator lights in the light sequence image, which is prone to misidentification under changing ambient light conditions, thereby resulting in inaccurate light sequence recognition of the electronic product to be identified.
[0071] Therefore, in an embodiment of the present application, in order to solve the above-mentioned problem, it is considered that the distribution of each color in the light sequence collection image can be determined through the color histogram of the light sequence collection image of the electronic product to be identified, and the light sequence collection image is adjusted to a light sequence recognition image including the light on color, the light off color and the background color, so that the light sequence recognition image can be accurately identified by paying attention to the light on color, the light off color and the background color in the future, and the light sequence recognition state of the electronic product to be identified is obtained; after executing the above S201 to obtain the light sequence collection image of the electronic product to be identified, a histogram of the light sequence collection image is drawn to obtain a color histogram of the light sequence collection image; the light sequence collection image is adjusted to a light sequence recognition image according to the color statistical result of the color histogram, so that the light sequence recognition image includes the light on color, the light off color and the background color.
[0072] Among them, the color histogram refers to the statistical graph of the distribution of each color in the light sequence acquisition image; the color statistical result refers to the statistical value of the distribution of each color in the light sequence acquisition image; the light sequence recognition image refers to the image obtained by adjusting the light sequence acquisition image, including the light on color, light off color and background color.
[0073] The above S202-S203 take into account the influence of changing ambient light on the light sequence acquisition image of the electronic product to be identified. By drawing a color histogram of the light sequence acquisition image, the distribution of each color in the light sequence acquisition image is clarified, so as to adjust the light sequence acquisition image to a light sequence recognition image including the light on color, the light off color and the background color. On the basis of paying attention to the light on color and the light off color, further attention is paid to the background color affected by the changing ambient light, so as to provide accurate image information for the subsequent accurate identification of the light sequence of the electronic product to be identified.
[0074] S204: performing light sequence state recognition on the light sequence recognition image according to the light on color, light off color and background color to obtain the light sequence recognition state of the electronic product to be recognized.
[0075] In an embodiment of the present application, after executing the above S202-S203 to draw a histogram of the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image, and adjusting the light sequence acquisition image to a light sequence recognition image according to the color statistics result of the color histogram, the light sequence state of the light sequence recognition image can be obtained by identifying the light sequence state of the electronic product to be identified according to the light on color, light off color and background color.
[0076] The light sequence recognition state refers to a light on and light off combination sequence obtained by recognizing a light sequence recognition image based on the light on color, light off color and background color.
[0077] When identifying the light sequence of the electronic product to be identified, the above S204 identifies the light on color and the light off color based on the background color affected by the changing ambient light, which can more accurately identify the light on and the light off, greatly reducing the misidentification phenomenon, thereby improving the light sequence recognition accuracy of the electronic product to be identified.
[0078] Through various implementation methods provided in this embodiment, first, a light sequence acquisition image of the electronic product to be identified is obtained; a histogram of the light sequence acquisition image is drawn to obtain a color histogram of the light sequence acquisition image; the light sequence acquisition image is adjusted to a light sequence recognition image according to the color statistics of the color histogram, so that the light sequence recognition image includes the light on color, the light off color and the background color; this method takes into account the influence of the changing ambient light on the light sequence acquisition image of the electronic product to be identified, and by drawing the color histogram of the light sequence acquisition image, the distribution of each color in the light sequence acquisition image is clarified to adjust the light sequence acquisition image to a light sequence recognition image including the light on color, the light off color and the background color, and on the basis of paying attention to the light on color and the light off color, further attention is paid to the background color affected by the changing ambient light. Then, according to the light on color, the light off color and the background color, the light sequence state of the light sequence recognition image is identified to obtain the light sequence recognition state of the electronic product to be identified; when identifying the light sequence of the electronic product to be identified, this method identifies the light on color and the light off color on the basis of considering the background color affected by the changing ambient light, and can more accurately identify the light on and the light off, greatly reducing the phenomenon of misidentification, thereby improving the accuracy of light sequence recognition of electronic products.
[0079] In the embodiment of the present application, when the above S203 is specifically implemented to adjust the light sequence acquisition image to a light sequence recognition image including the light on color, the light off color and the background color according to the color statistics result of the color histogram, it is considered that the statistical value of each color distribution in the light sequence acquisition image can be determined by the color statistics result of the color histogram to determine the light on color, the light off color and the background color, so as to adjust the light sequence acquisition image to a light sequence recognition image including the light on color, the light off color and the background color; therefore, the light on color, the light off color and the background color are first determined according to the color statistics result of the color histogram, and then the light sequence acquisition image is adjusted to the light sequence recognition image according to the light on color, the light off color and the background color. Based on this, in an optional implementation of the embodiment of the present application, the above S203 may, for example, include the following S203a-S203b (not shown in the figure).
[0080] S203a: Determine the light color, light off color and background color according to the color statistics result of the color histogram.
[0081] S203b: Perform color adjustment on the light sequence acquisition image according to the light on color, light off color and background color to obtain a light sequence recognition image.
[0082] The above S203a-S203b clarifies the statistical values of the distribution of each color in the light sequence acquisition image through the color statistical results of the color histogram, and can accurately determine the light on color, light off color and background color, so as to accurately adjust the light sequence acquisition image to a light sequence recognition image including the light on color, light off color and background color.
[0083] In the embodiment of the present application, when the above S204 is specifically implemented to obtain the light sequence recognition state of the electronic product to be identified by identifying the light sequence state of the light sequence recognition image according to the light on color, the light off color and the background color, considering that the light on color and the light off color in the light sequence recognition image are identified on the basis of the background color, the light on information and the light off information representing the light on and light off combination order of the electronic product to be identified can be obtained, thereby determining the light sequence recognition state of the electronic product to be identified; therefore, the light sequence recognition image is first identified according to the light on color, the light off color and the background color to obtain the light on information and the light off information of the electronic product to be identified, and then the light sequence recognition state of the electronic product to be identified is determined based on the light on information and the light off information. Based on this, in an optional implementation of the embodiment of the present application, the above S204 may, for example, include the following S204a-S204b (not shown in the figure).
[0084] S204a: Performing light sequence state recognition on the light sequence recognition image according to the light on color, light off color and background color, and obtaining light on information and light off information of the electronic product to be recognized.
[0085] S204b: Determine the light sequence recognition state according to the light on information and light off information.
[0086] The lighting information refers to the number of lights on and the positions of lights on in the light sequence recognition image; the lighting off information refers to the number of lights off and the positions of lights off in the light sequence recognition image. Based on this, in an optional implementation of the embodiment of the present application, the lighting information includes the number of lights on and the positions of lights on; the lighting off information includes the number of lights off and the positions of lights off.
[0087] The above S204a-S204b identifies the light color and the light off color based on the background color considering the changing ambient light, and can more accurately identify the light on information and the light off information, so as to more accurately identify the light on and the light off, greatly reduce the misidentification phenomenon, and thus more accurately identify the light sequence recognition status of the electronic product to be identified.
[0088] In the embodiment of the present application, when the above S204a is specifically implemented to obtain the lighting information and the light off information of the electronic product to be identified by identifying the light sequence recognition image according to the lighting color, the light off color and the background color, it is considered that the background color is mainly used to distinguish the different background modes of the bright background and the dark background, so as to identify the lighting color and the light off color in the light sequence recognition image, and obtain the lighting information and the light off information of the electronic product to be identified; therefore, on the basis of the background mode of the bright background or the dark background corresponding to the background color, the lighting color and the light off color in the light sequence recognition image are identified, and the lighting information and the light off information of the electronic product to be identified. Based on this, in an optional implementation of the embodiment of the present application, the above S204a may include S204aa (not shown in the figure): according to the lighting color, the light off color and the background mode corresponding to the background color, the light sequence state recognition of the light sequence recognition image is performed to obtain the lighting information and the light off information; the background mode is used to represent a bright background or a dark background.
[0089] The above S204aa can further accurately identify the light-on information and the light-off information on the basis of considering that the background mode corresponding to the background color affected by the changing ambient light is a bright background or a dark background.
[0090] In the embodiment of the present application, when the above S201 of obtaining the light sequence acquisition image of the electronic product to be identified is specifically implemented, it is considered that the camera can acquire the light sequence image of the electronic product to be identified to obtain the light sequence acquisition image; therefore, the camera needs to be fixed on the opposite side of the electronic product to be identified through a fixed bracket, and in order for the light sequence recognition device of the light sequence recognition method to obtain the light sequence acquisition image of the electronic product to be identified from the camera, the light sequence recognition device needs to be connected to the fixed bracket through a communication cable. Based on this, in an optional implementation of the embodiment of the present application, the above S201 may, for example, include the following S201a (not shown in the figure): obtaining the light sequence acquisition image of the electronic product to be identified from the camera; the camera is connected to the fixed bracket, and the fixed bracket is connected to the light sequence recognition device of the light sequence recognition method through a communication cable.
[0091] Among them, the camera refers to a video recording device that collects and identifies the light sequence images of electronic products; the fixed bracket refers to the bracket that fixes the camera; the communication cable refers to the cable that communicates and transmits the light sequence collection images; the light sequence recognition device refers to the device that executes the light sequence recognition method.
[0092] The light sequence recognition device of the above-mentioned S201a light sequence recognition method obtains the light sequence acquisition image of the electronic product to be identified by connecting the camera on the fixed bracket through a communication cable. It has low cost and strong versatility, and adopts an asynchronous structure to split the light sequence image acquisition and recognition of the electronic product to be identified into two parts, thereby avoiding problems in the light sequence image acquisition and recognition of the electronic product to be identified at the same time.
[0093] See also Figure 3 , Figure 3A schematic diagram of a light sequence recognition scenario of an electronic product provided in an embodiment of the present application. The light sequence recognition scenario of an electronic product includes an electronic product 301 to be recognized, a camera 302, a fixed bracket 303, a communication cable 304, and a light sequence recognition device 305; the camera 302 opposite the electronic product 301 to be recognized is connected to the fixed bracket 303, and the fixed bracket 303 is connected to the light sequence recognition device 305 via the communication cable 304.
[0094] In addition, in the embodiment of the present application, since the light sequence recognition state of the electronic product to be identified can indicate the product working state of the electronic product to be identified, the product working state of the electronic product to be identified can also be determined based on the light sequence recognition state of the electronic product to be identified. Therefore, in an optional implementation of the embodiment of the present application, the method can also include S205: determining the product working state of the electronic product to be identified according to the light sequence recognition state.
[0095] In the above S205 , when the recognition accuracy of the light sequence recognition state of the electronic product to be identified is higher, the product working state of the electronic product to be identified can be determined more accurately through the light sequence recognition state of the electronic product to be identified.
[0096] For the above content, see Figure 4 , Figure 4 A flowchart of a method for identifying the working status of an electronic product provided in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0097] S401: Acquire a light sequence acquisition image of the electronic product to be identified from a camera; the camera is connected to a fixed bracket, and the fixed bracket is connected to a light sequence identification device of a light sequence identification method through a communication cable.
[0098] S402: Draw a histogram of the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image.
[0099] S403: Determine the light color, light off color and background color according to the color statistics result of the color histogram.
[0100] S404: adjusting the color of the light sequence acquisition image according to the light on color, the light off color and the background color to obtain a light sequence recognition image of the light sequence acquisition image; the light sequence recognition image includes the light on color, the light off color and the background color.
[0101] S405: Perform light sequence state recognition on the light sequence recognition image according to the background pattern corresponding to the light on color, the light off color and the background color to obtain light on information and light off information; the background pattern is used to represent a bright background or a dark background.
[0102] S406: Determine the light sequence recognition state of the electronic product to be recognized according to the light on information and the light off information.
[0103] S407: Determine the product working status of the electronic product to be identified according to the light sequence identification status.
[0104] Next, the specific implementation of the light sequence recognition device for an electronic product in the embodiment of the present application is described in detail through an embodiment.
[0105] See also Figure 5 , Figure 5 A schematic diagram of the structure of a light sequence recognition device for an electronic product provided in an embodiment of the present application. In this embodiment, the device may specifically include: an acquisition unit 501, a drawing unit 502, an adjustment unit 503 and a recognition unit 504;
[0106] An acquisition unit 501 is used to acquire a light sequence acquisition image of an electronic product to be identified;
[0107] A drawing unit 502, used for drawing a histogram of the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image;
[0108] The adjustment unit 503 is used to adjust the color of the light sequence acquisition image according to the color statistics result of the color histogram to obtain a light sequence recognition image of the light sequence acquisition image; the light sequence recognition image includes a light on color, a light off color and a background color;
[0109] The recognition unit 504 is used to perform light sequence state recognition on the light sequence recognition image according to the light on color, light off color and background color, and obtain the light sequence recognition state of the electronic product to be recognized.
[0110] In an optional implementation of the embodiment of the present application, the adjustment unit 503 is used to:
[0111] According to the color statistics result of the color histogram, determine the light color, light off color and background color;
[0112] The light sequence acquisition image is color-adjusted according to the light on color, light off color and background color to obtain a light sequence recognition image.
[0113] In an optional implementation of the embodiment of the present application, the identification unit 504 is used to:
[0114] The light sequence recognition image is used to recognize the light sequence state according to the light on color, light off color and background color, and the light on information and light off information of the electronic product to be recognized are obtained;
[0115] According to the lighting information and the lighting off information, the lighting sequence recognition status is determined.
[0116] In an optional implementation of the embodiment of the present application, the identification unit 504 is used to:
[0117] The light sequence recognition image is subjected to light sequence state recognition according to the background pattern corresponding to the light on color, light off color and background color to obtain light on information and light off information; the background pattern is used to represent a bright background or a dark background.
[0118] In an optional implementation of the embodiment of the present application, the lighting information includes the number of lights on and the positions of the lights on; the lighting information includes the number of lights off and the positions of the lights off.
[0119] In an optional implementation of the embodiment of the present application, the acquisition unit 501 is used to:
[0120] A light sequence acquisition image of an electronic product to be identified is obtained from a camera; the camera is connected to a fixed bracket, and the fixed bracket is connected to a light sequence identification device of a light sequence identification method through a communication cable.
[0121] In an optional implementation of the embodiment of the present application, the device further includes: a determining unit;
[0122] The determination unit is used to determine the product working state of the electronic product to be identified according to the light sequence recognition state.
[0123] Through various implementation methods provided in this embodiment, the light sequence recognition device of an electronic product includes an acquisition unit, a drawing unit, an adjustment unit and a recognition unit. Among them, the acquisition unit acquires the light sequence acquisition image of the electronic product to be identified; the drawing unit draws the histogram of the light sequence acquisition image to obtain the color histogram of the light sequence acquisition image; the adjustment unit adjusts the light sequence acquisition image to a light sequence recognition image according to the color statistics result of the color histogram, so that the light sequence recognition image includes the light on color, the light off color and the background color; the unit considers the influence of the changing ambient light on the light sequence acquisition image of the electronic product to be identified, and clarifies the distribution of each color in the light sequence acquisition image by drawing the color histogram of the light sequence acquisition image, so as to adjust the light sequence acquisition image to a light sequence recognition image including the light on color, the light off color and the background color, and further pays attention to the background color affected by the changing ambient light on the basis of paying attention to the light on color and the light off color; the recognition unit identifies the light sequence state of the light sequence recognition image according to the light on color, the light off color and the background color to obtain the light sequence recognition state of the electronic product to be identified; when identifying the light sequence of the electronic product to be identified, the unit identifies the light on color and the light off color on the basis of considering the background color affected by the changing ambient light, and can more accurately identify the light on and the light off, greatly reducing the misidentification phenomenon, thereby improving the light sequence recognition accuracy of the electronic product.
[0124] In addition, an embodiment of the present application further provides a light sequence recognition device, the light sequence recognition device comprising a processor and a memory:
[0125] The memory is used to store a computer program and transmit the computer program to the processor;
[0126] The processor is configured to execute the method described in the above embodiment according to the instructions in the computer program.
[0127] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, it is used to implement the method described in the above embodiment.
[0128] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0129] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0130] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0131] The above is only a preferred embodiment of the present application and does not constitute any formal limitation to the present application. Although the present application has been disclosed as above with a preferred embodiment, it is not intended to limit the present application. Any technician familiar with the art can make many possible changes and modifications to the technical solution of the present application using the methods and technical contents disclosed above without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still fall within the scope of protection of the technical solution of the present application.
Claims
1. A method for identifying light sequence of electronic products, characterized in that: include: Acquire a light sequence acquisition image of the electronic product to be identified; Performing a histogram drawing on the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image; Performing color adjustment on the light sequence acquisition image according to the color statistics result of the color histogram to obtain a light sequence recognition image of the light sequence acquisition image; the light sequence recognition image includes a light on color, a light off color and a background color; The light sequence state of the light sequence recognition image is recognized according to the light-on color, the light-off color and the background color to obtain the light sequence recognition state of the electronic product to be recognized.
2. The method according to claim 1, characterized in that The step of performing image adjustment on the light sequence acquisition image according to the color statistics result of the color histogram to obtain the light sequence recognition image includes: Determine the light-on color, the light-off color, and the background color according to the color statistics result of the color histogram; The light sequence acquisition image is color-adjusted according to the light-on color, the light-off color and the background color to obtain the light sequence recognition image.
3. The method according to claim 1, characterized in that: The step of performing light sequence state recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain the light sequence recognition state of the electronic product to be recognized includes: Performing light sequence state recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain light on information and light off information of the electronic product to be recognized; The light sequence recognition state is determined according to the light-on information and the light-off information.
4. The method according to claim 3, characterized in that The step of performing light sequence state recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain light on information and light off information of the electronic product to be recognized includes: The light sequence state of the light sequence recognition image is recognized according to the background pattern corresponding to the light on color, the light off color and the background color to obtain the light on information and the light off information; the background pattern is used to represent a bright background or a dark background.
5. The method according to claim 3 or 4, characterized in that: The lighting information includes the number of lights on and the positions of lights on; the lighting information includes the number of lights off and the positions of lights off.
6. The method according to claim 1, characterized in that The step of acquiring a light sequence acquisition image of the electronic product to be identified comprises: A light sequence acquisition image of the electronic product to be identified is obtained from a camera; the camera is connected to a fixed bracket, and the fixed bracket is connected to a light sequence identification device of the light sequence identification method through a communication cable.
7. The method according to claim 1, characterized in that The method further comprises: The product working status of the electronic product to be identified is determined according to the light sequence identification status.
8. A light sequence recognition device for an electronic product, characterized in that: include: an acquisition unit, a drawing unit, an adjustment unit, and an identification unit; The acquisition unit is used to acquire a light sequence acquisition image of the electronic product to be identified; The drawing unit is used to draw a histogram of the light sequence acquisition image to obtain a color histogram of the light sequence acquisition image; The adjustment unit is used to perform color adjustment on the light sequence acquisition image according to the color statistics result of the color histogram to obtain a light sequence recognition image of the light sequence acquisition image; the light sequence recognition image includes a light on color, a light off color and a background color; The recognition unit is used to perform light sequence status recognition on the light sequence recognition image according to the light on color, the light off color and the background color to obtain the light sequence recognition status of the electronic product to be recognized.
9. A light sequence recognition device, characterized in that: The light sequence recognition device includes a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1 to 7 according to the instructions in the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, it is used to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Target object color identification method and device, washing equipment and electronic equipment
CN116645526A
