A method and apparatus for determining a lighting scheme

By automatically adjusting the light source parameters through a deep learning model, a lighting scheme is generated and selected, which solves the problem of lighting scheme selection being affected by human subjectivity and improves the accuracy and efficiency of character recognition.

CN115909306BActive Publication Date: 2026-01-02SHENZHEN SMARTMORE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211357774.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2026-01-02
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

The selection of lighting schemes in existing technologies is greatly influenced by human subjectivity, resulting in poor accuracy and low efficiency in character recognition on product surfaces.

Method used

The deep learning model automatically adjusts the lighting parameters of the light source, generates multiple alternative lighting schemes, and objectively selects the most suitable lighting scheme based on the character recognition results, reducing the influence of human subjective judgment.

Benefits of technology

This improved the quality of the lighting scheme and the accuracy and efficiency of product image character recognition, reducing the need for manual adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115909306B_ABST
    Figure CN115909306B_ABST
Patent Text Reader

Abstract

The application provides a method and device for determining a lighting scheme, and relates to the technical field of intelligent dimming. The method comprises the following steps: lighting and photographing a first detection target according to N alternative lighting schemes to obtain N lighting images corresponding to the N alternative lighting schemes respectively, wherein the N alternative lighting schemes are obtained by adjusting lighting parameters of a light source according to a preset adjustment rule; performing character recognition on the N lighting images through a deep learning model to obtain character recognition results of the N alternative lighting schemes; and determining a lighting scheme for the first detection target from the N alternative lighting schemes according to the character recognition results of the N alternative lighting schemes, wherein N is a positive integer. The method can objectively select a suitable lighting scheme according to the character recognition results, thereby reducing the influence of artificial subjective judgment when determining the lighting scheme, improving the quality of the lighting scheme, and further improving the character recognition accuracy of a product image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent dimming, in particular to a method and device for determining a lighting scheme. BACKGROUND

[0002] With the development of science and technology, the production scale of industrial products is increasingly expanding. Before the industrial products are shipped, the products need to be detected to obtain image information of the product surface, and the character information on the product surface is representative. Whether the machine can accurately identify the character information on the product surface mainly depends on whether the lighting scheme adopted for the product when the image is obtained is appropriate. If the lighting scheme is appropriate, the identification result is more accurate. However, the commonly used lighting method at present is to manually adjust the lighting parameters by a person to determine the lighting scheme. Therefore, the selected lighting scheme is greatly affected by the subjective judgment of the operator, which may result in poor accuracy of the character recognition on the product surface. Moreover, the judgment standards of different operators are different, and it is difficult to determine a relatively objective lighting scheme. In addition, the lighting is inefficient only by manual operation.

[0003] Therefore, when selecting the lighting scheme, how to reduce the influence of the subjective judgment of the person and improve the quality of the lighting scheme, and further improve the character recognition accuracy of the product image, is an urgent problem to be solved. SUMMARY

[0004] The present application provides a method and device for determining a lighting scheme, aiming to improve the quality of the lighting scheme and further improve the character recognition accuracy of the product image.

[0005] In a first aspect, a method for determining a lighting scheme is provided, which includes: lighting and photographing a first detection target according to N candidate lighting schemes to obtain N lighting images respectively corresponding to the N candidate lighting schemes, wherein the N candidate lighting schemes are obtained by adjusting lighting parameters of a light source according to a preset adjustment rule, and the lighting parameters include at least one adjustable parameter: emission light direction, wavelength, brightness, color temperature, and number of light sources; performing character recognition on the N lighting images by using a deep learning model to obtain character recognition results of the N candidate lighting schemes; and determining a lighting scheme for the first detection target from the N candidate lighting schemes according to the character recognition results of the N candidate lighting schemes, wherein N is a positive integer.

[0006] It should be understood that, since the light source used for lighting the above-mentioned first detection target can be composed of multiple sub-light sources, the number of light sources can be used as a kind of lighting parameter.

[0007] Embodiments of the present application determine available alternative lighting schemes by automatically adjusting lighting parameters of a light source, perform character recognition on lighting images obtained based on each lighting scheme respectively, and objectively select a relatively suitable lighting scheme from the multiple alternative lighting schemes according to the character recognition results, thereby reducing the influence of artificial subjective judgment when determining the lighting scheme, improving the quality of the lighting scheme, and further improving the character recognition accuracy and efficiency of product images. Meanwhile, the adjustment of the alternative lighting scheme can be automatically performed without manual adjustment based on experience, thereby improving the selection efficiency and providing a more suitable lighting scheme.

[0008] Specifically, when character detection is required for a certain type of detection target (e.g., characters on a wafer, a circuit board, or a mechanical device), different types of detection targets can be suitable for different lighting schemes. In a traditional scheme, a limited number of alternative lighting schemes are manually set based on experience, and then it is determined one by one whether they are suitable for the current detection target. However, this method is not only inefficient, but also cannot guarantee that the most suitable lighting scheme is selected. Embodiments of the present application automate the entire process including the obtaining of alternative lighting schemes, the acquisition of lighting images, the character recognition of lighting images, and the selection of lighting schemes, which can greatly reduce the influence of artificial subjective judgment in the setting and selection process of the lighting scheme and provide a more suitable lighting scheme, thereby improving the character recognition accuracy of product images.

[0009] For example, a lighting scheme can generate one lighting image, and one lighting image corresponds to one character recognition result.

[0010] For example, before determining the first scores of the N lighting images based on the character recognition results of the N lighting images, the lighting images are preprocessed, and the image preprocessing includes image flipping, image rotation, Gaussian filtering, and erosion and expansion.

[0011] Based on the above technical solutions, the accuracy of character recognition of the lighting images can be effectively improved, and the lighting images are more easily subjected to character recognition.

[0012] For example, the deep learning model can be an optical character recognition (OCR) model. The OCR model is used to perform character recognition on each of the N lighting images. The specific type of the OCR model is not limited in the embodiments of the present application.

[0013] It should be understood that the character recognition result of the final determined lighting scheme for the first detection target is clearer or more accurate than the character recognition result of other alternative lighting schemes. Therefore, the final output character recognition result is also relatively more accurate.

[0014] Based on the above technical solution, the multiple alternative lighting schemes can be automatically evaluated according to the character recognition results of the multiple alternative lighting schemes, and a more appropriate lighting scheme for the first detection target can be determined, which reduces the influence of artificial subjective judgment when determining the lighting scheme, selects an appropriate lighting scheme for target lighting, improves the quality of the lighting scheme, and further improves the character recognition accuracy of the product image.

[0015] In combination with the first aspect, in some implementations of the first aspect, for each lighting image, the minimum bounding rectangle position, the minimum bounding rectangle area, and the confidence of each character in the lighting image are determined, and the score of the lighting image is determined according to the minimum bounding rectangle position, the minimum bounding rectangle area, and the confidence of each character in the lighting image; the alternative lighting scheme corresponding to the lighting image with the highest score is determined as the lighting scheme for the first detection target.

[0016] For example, the confidence of each character can be a deep network inference confidence.

[0017] For example, when the score is the first score, the alternative lighting scheme corresponding to the highest first score can be determined to be more appropriate than other lighting schemes, and the corresponding character recognition result is also more accurate, so the alternative lighting scheme can be determined as the lighting scheme for the first detection target.

[0018] Based on the above technical solution, the first score is determined by the minimum bounding rectangle position, the minimum bounding rectangle area, and the confidence of each character in the lighting image, and the current lighting scheme is objectively evaluated by the first score. Since the standard of the first score is objective and unified, the situation of inconsistent lighting scheme quality caused by subjective factors of artificial evaluation is reduced, which helps to improve the quality of the lighting scheme and further improve the character recognition accuracy of the product lighting image.

[0019] In some implementations of the first aspect, according to positions of minimum bounding rectangles of each character in the lighted image, J character region blocks in the lighted image are determined by a clustering model, each of the J character region blocks including I characters, where J and I are positive integers; according to a confidence level of each character in each of the character region blocks, a character confidence level average of each of the character region blocks in the lighted image is determined; according to an area of the minimum bounding rectangle of each character in each of the character region blocks, an area average of the minimum bounding rectangle of each of the character region blocks in the lighted image is determined; according to the character confidence level average and the area average of the minimum bounding rectangle of the lighted image, a first character region block of the lighted image is determined; and according to the character confidence level average and the area average of the minimum bounding rectangle corresponding to the first character region block of the lighted image, the first score is determined.

[0020] For example, the clustering model is mainly used to divide a larger character region into J local parts, and I characters in each of the local parts are mutually adjacent or similar in form, and the accuracy of character recognition can be effectively improved by performing character recognition on each of the local parts. The clustering model applied in the embodiments of the present application can include a K-means clustering algorithm, a system clustering algorithm, and the like.

[0021] Based on the above technical solution, the first score corresponding to the N candidate lighted schemes can be objectively and uniformly determined by the above method, the influence of subjective judgment by a human being in determining the lighted scheme is reduced, a suitable lighted scheme is selected as a target lighted scheme, the quality of the lighted scheme is improved, and the character recognition accuracy of the product image is further improved.

[0022] In some implementations of the first aspect, according to the character confidence level average and the area average of the minimum bounding rectangle of the lighted image, a standard deviation of the character confidence level and a standard deviation of the area of the minimum bounding rectangle of each of the J character region blocks are determined; and a character region block with a minimum sum of the standard deviation of the character confidence level and the standard deviation of the area of the minimum bounding rectangle is determined as the first character region block.

[0023] For example, the first character region block of the lighted image can be determined according to the following formulas (1) to (4):

[0024]

[0025]

[0026]

[0027]

[0028] In std_avgpj and std_avga jdetermining the jth character region block as the first character region block when the sum is the smallest;

[0029] wherein represents the confidence of the ith character in the jth character region block, avgp j represents the average value of the character confidence of the jth character region block, represents the minimum circumscribed rectangle area of the ith character in the jth character region block, avgp j represents the average value of the character circumscribed rectangle area of the jth character region block, std_avgp j represents the standard deviation of the character confidence of the jth character region block, std_avga j represents the standard deviation of the character circumscribed rectangle area in the jth character region block, i is a positive integer less than or equal to I, and j is a positive integer less than or equal to J.

[0030] In some implementations of the first aspect, the first score includes a sum of a first part and a second part, wherein the first part is positively correlated with the average value of the character confidence of the first character region block of the lighted image, and the second part is negatively correlated with the standard deviation of the average value of the character circumscribed rectangle area of the first character region block of the lighted image.

[0031] Based on the above technical solution, the first score corresponding to the N candidate lighted schemes can be objectively and uniformly determined by the above method, the influence from artificial subjective judgment in determining the lighted scheme is reduced, a suitable lighted scheme is selected as the target lighted scheme, the quality of the lighted scheme is improved, and the character recognition accuracy of the product image is further improved.

[0032] In some implementations of the first aspect, the second score is determined according to the length of the first real string and the length of the character recognition result of the candidate lighted scheme, the first real string being the real character information of the first detection target surface known; the third score is determined according to the similarity between the first real string and the character recognition result of the candidate lighted scheme; and the score is determined according to the first score, the second score, and the third score.

[0033] For example, the first real string can be obtained through external input.

[0034] Based on the above technical solution, when the first real string is known, the second score and the third score are introduced to jointly determine the score with the first score, so that the lighted scheme for the first detection target is objectively and reasonably determined, the quality of the lighted scheme is improved, and the finally output character recognition result is more accurate, thereby improving the character recognition accuracy of the product lighted image.

[0035] With reference to the first aspect, in some implementations of the first aspect, the second score is determined by comparing a difference between the first real string length of the lighted image and a length of the character recognition result of the alternative lighted scheme.

[0036] For example, the second score can be determined according to the following formula (5) or (6):

[0037]

[0038]

[0039] wherein score2 represents the second score, l true represents the first real string length of the lighted image, l ocr represents the length of the character recognition result of the alternative lighted scheme.

[0040] For example, for the formula (6), when the length of the first real string is the same as the length of the character recognition result, the second score is 1, and when the length of the first real string is different from the length of the character recognition result, the second score is 0.

[0041] For example, for the formula (7), if the length of the first real string is less than or equal to the character length corresponding to the character recognition result, the second score is a ratio of the length of the first real string to the character length corresponding to the character recognition result. If the length of the first real string is greater than or the length of the character recognition result, the second score is a ratio of the character length corresponding to the character recognition result to the length of the first real string. The smaller the difference between the length of the first real string and the character length corresponding to the character recognition result, the higher the second score. The greater the difference between the length of the first real string and the character length corresponding to the character recognition result, the lower the second score.

[0042] With reference to the first aspect, in some implementations of the first aspect, the third score is determined according to an edit distance between the first real string and the character recognition result of the alternative lighted scheme; or, the third score is determined according to a cosine similarity between the first real string and the character recognition result of the alternative lighted scheme; or, the third score is determined according to an Euclidean distance between the first real string and the character recognition result of the alternative lighted scheme.

[0043] For example, the edit distance refers to a minimum number of editing operations for converting the character recognition result into the first real string, and the editing operations can include inserting a character at any position, deleting a character at any position, and modifying a character at any position. The higher the similarity between the first real string and the character recognition result, the smaller the edit distance, and the higher the third score.

[0044] For example, the higher the similarity between the first real string and the character recognition result, the higher the cosine similarity between the first real string and the character recognition result, and the higher the third score.

[0045] For example, the higher the similarity between the first real string and the character recognition result, the smaller the Euclidean distance between the first real string and the character recognition result, and the higher the third score.

[0046] In combination with the first aspect, in some implementations of the first aspect, the score is determined according to a weighted sum of the first score, the second score, and the third score.

[0047] Based on the above technical solution, when the first real string is known, the second score and the third score are introduced to jointly determine the score with the first score, so as to objectively and reasonably determine the lighting scheme for the first detection target, improve the quality of the lighting scheme, and further make the finally output character recognition result more accurate, thereby improving the character recognition accuracy of the product lighting image.

[0048] In combination with the first aspect, in some implementations of the first aspect, the second detection target is lighted and photographed according to the determined lighting scheme for the first detection target to obtain a lighting image of the second detection target; and the deep learning model is used to perform character recognition on the lighting image of the second detection target to obtain a character recognition result when the lighting scheme for the first detection target is applied to the second detection target.

[0049] Based on the above technical solution, since the determined lighting scheme for the first detection target is a relatively general scheme, after the first detection target is lighted for the first time, the lighting scheme for the first detection target can also be applied to the lighting operation of other detection targets, thereby improving the efficiency of character recognition on the surfaces of different products.

[0050] In combination with the first aspect, in some implementations of the first aspect, the first score when the lighting scheme for the first detection target is applied to the second detection target is determined according to the character recognition result when the lighting scheme for the first detection target is applied to the second detection target; and when the first score when the lighting scheme for the first detection target is applied to the second detection target is higher than a first preset threshold, the lighting scheme for the first detection target is used to light the second detection target, wherein the first preset threshold is a positive number.

[0051] For example, when the first score of the first detection target when the lighting scheme of the first detection target is applied to the second detection target is not higher than a first preset threshold, the lighting scheme of the second detection target needs to be re-determined, and the method in any one of the possible implementation manners of the method design of the first aspect is performed to select the alternative lighting scheme corresponding to the highest first score as the lighting scheme for the second detection target.

[0052] Based on the above technical solution, even if the difference between the first detection target and other detection targets is large, the lighting scheme can still be automatically re-determined, manual participation in subsequent light adjustment operations is reduced, the quality of the lighting scheme is further improved, and the character recognition accuracy and efficiency of the product image are improved.

[0053] In combination with the first aspect, in some implementation manners of the first aspect, the score of the first detection target when the lighting scheme of the first detection target is applied to the second detection target is determined according to a second real string and a character recognition result of the second detection target when the lighting scheme of the first detection target is applied to the second detection target, the second real string being the real character information of the surface of the second detection target; when the score of the first detection target when the lighting scheme of the first detection target is applied to the second detection target is higher than a second preset threshold, the lighting scheme of the first detection target is used to light the second detection target, and the second preset threshold is a positive number.

[0054] For example, the second real string can be obtained through external input.

[0055] For example, when the score of the first detection target when the lighting scheme of the first detection target is applied to the second detection target is not higher than a second preset threshold, the lighting scheme of the second detection target needs to be re-determined, and the method in any one of the possible implementation manners of the method design of the first aspect is performed to select the alternative lighting scheme corresponding to the highest first score as the lighting scheme for the second detection target.

[0056] Based on the above technical solution, even if the difference between the first detection target and other detection targets is large, the lighting scheme can still be automatically re-determined, manual participation in subsequent light adjustment operations is reduced, the quality of the lighting scheme is further improved, and the character recognition accuracy and efficiency of the product image are improved.

[0057] In a second aspect, a device for determining a lighting scheme is provided, the device comprising: a determining unit configured to adjust lighting parameters of a light source according to a preset adjustment rule to determine N candidate lighting schemes; a photographing unit configured to light and photograph a first detection target according to the N candidate lighting schemes to obtain N lighting images respectively corresponding to the N candidate lighting schemes; and a processing unit configured to perform character recognition on the N lighting images by using a deep learning model to obtain character recognition results of the N candidate lighting schemes; and the determining unit is further configured to determine a lighting scheme for the first detection target from the N candidate lighting schemes according to the character recognition results of the N candidate lighting schemes, wherein N is a positive integer.

[0058] It should be understood that, since the light source used to light the first detection target can be composed of a plurality of sub-light sources, the number of light sources can be used as a lighting parameter.

[0059] For example, one lighting scheme can correspond to one lighting image, and one lighting image corresponds to one character recognition result.

[0060] For example, the processing unit is further configured to perform image preprocessing on the lighting image, and the image preprocessing includes image flipping, image rotation, Gaussian filtering, and erosion and expansion.

[0061] Based on the above technical solution, the accuracy of character recognition of the lighting image can be effectively improved, and the lighting image is more easily subjected to character recognition.

[0062] For example, the deep learning model can be an optical character recognition (OCR) model. The OCR model is used to perform character recognition on each of the N lighting images.

[0063] It should be understood that the character recognition result of the finally determined lighting scheme for the first detection target is clearer and more accurate than the character recognition results of other candidate lighting schemes. Therefore, the finally output character recognition result is also relatively accurate.

[0064] Based on the above technical solution, the character recognition results of the plurality of candidate lighting schemes can be automatically evaluated to determine a more suitable lighting scheme for the first detection target, thereby reducing the influence of artificial subjective judgment on the determination of the lighting scheme, selecting a suitable lighting scheme for the target lighting, improving the quality of the lighting scheme, and further improving the character recognition accuracy of the product image.

[0065] With reference to the second aspect, in some implementations of the second aspect, for each lighted image, the determination unit is specifically configured to determine a minimum bounding rectangle position, a minimum bounding rectangle area and a confidence of each character in the lighted image, and determine a score of the lighted image according to the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of the each character in the lighted image; and determine the lighted scheme corresponding to the lighted image with the highest score as the lighted scheme for the first detection target.

[0066] For example, the confidence of each character can be a deep network inference confidence.

[0067] For example, when the score is the first score, it can be determined that the lighted scheme corresponding to the highest first score is more suitable than other lighted schemes, and the character recognition result corresponding to the lighted scheme is more accurate, so the lighted scheme can be determined as the lighted scheme for the first detection target.

[0068] Based on the technical solution, the first score is determined according to the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of each character in the lighted image, and the current lighted scheme is objectively evaluated through the first score. Since the standard of the first score is objective and unified, the situation that the quality of the lighted scheme is not unified due to subjective factors of artificial evaluation is reduced, which helps to improve the quality of the lighted scheme and further improve the character recognition accuracy of the product lighted image.

[0069] With reference to the second aspect, in some implementations of the second aspect, the determination unit is specifically configured to determine J character region blocks in the lighted image through a clustering model according to the minimum bounding rectangle position of each character in the lighted image, each character region block includes I characters, where J and I are positive integers; determine a character confidence average of each character region block of the lighted image according to the confidence of each character in each character region block; determine a character bounding rectangle area average of each character region block of the lighted image according to the minimum bounding rectangle area of each character in each character region block; determine a first character region block of the lighted image according to the character confidence average and the character bounding rectangle area average of the lighted image; and determine the first score according to the character confidence average and the character bounding rectangle area average corresponding to the first character region block of the lighted image.

[0070] For example, the clustering model is mainly used to divide a larger character region into J parts, and I characters in each part are mutually adjacent or similar characters, and the accuracy of character recognition can be effectively improved by performing character recognition on each part. The clustering model applied in the embodiments of the present application can include a K-means clustering algorithm, a system clustering algorithm, etc.

[0071] Based on the above technical solution, the first score corresponding to the N alternative lighting schemes can be objectively and uniformly determined by the above method, the influence from artificial subjective judgment in determining the lighting scheme is reduced, the appropriate lighting scheme is selected as the target lighting, the quality of the lighting scheme is improved, and the character recognition accuracy of the product image is further improved.

[0072] In combination with the second aspect, in some implementations of the second aspect, the determination unit is specifically configured to determine the standard deviation of the character confidence and the standard deviation of the character bounding rectangle area of each character region block in the J character region blocks according to the average value of the character confidence and the average value of the character bounding rectangle area of the lighting image; and determine the character region block with the smallest sum of the standard deviation of the character confidence and the standard deviation of the character bounding rectangle area as the first character region block.

[0073] For example, the determination unit can determine the first character region block of the lighting image according to the following formulas (1) to (4):

[0074]

[0075]

[0076]

[0077]

[0078] In std_avgp j and std_avga j when the sum of std_avgp

[0079] wherein represents the confidence of the i-th character in the j-th character region block, std_avgp j represents the average value of the character confidence of the j-th character region block, represents the minimum bounding rectangle area of the i-th character in the j-th character region block, std_avgp j represents the average value of the character bounding rectangle area of the j-th character region block, std_avgp j represents the standard deviation of the character confidence of the j-th character region block, std_avga j represents the standard deviation of the character bounding rectangle area in the j-th character region block, i is a positive integer less than or equal to I, and j is a positive integer less than or equal to J.

[0080] In some implementations of the second aspect, the first score comprises a first part and a second part, wherein the first part is positively correlated with an average value of the character confidence of the first character region block of the lighted image, and the second part is negatively correlated with a standard deviation of an average value of the character bounding rectangle area of the first character region block of the lighted image.

[0081] According to the above technical solution, the first score corresponding to the N candidate lighted schemes can be determined objectively and uniformly by the above method, the influence of artificial subjective judgment in determining the lighted scheme is reduced, a suitable lighted scheme is selected as the target lighted scheme, the quality of the lighted scheme is improved, and the character recognition accuracy of the product image is further improved.

[0082] In some implementations of the second aspect, the determining unit is further configured to determine a second score according to a length of a first real string and a length of a character recognition result of the candidate lighted scheme, the first real string being real character information of the first detection target surface that is known; determine a third score according to a similarity between the first real string and the character recognition result of the candidate lighted scheme; and determine the score according to the first score, the second score, and the third score.

[0083] According to the above technical solution, when the first real string is known, the second score and the third score are introduced to determine the score together with the first score, the lighted scheme for the first detection target is determined objectively and reasonably, the quality of the lighted scheme is improved, and the final output character recognition result is more accurate, and the character recognition accuracy of the product lighted image is improved.

[0084] In some implementations of the second aspect, the determining unit is specifically configured to determine the second score by comparing a difference between a length of a first real string of a lighted image and a length of a character recognition result of a candidate lighted scheme.

[0085] For example, the determining unit can determine the second score according to the following formula (5) or (6):

[0086]

[0087]

[0088] wherein score2 represents the second score, l true represents the length of the first real string of the lighted image, and l ocr represents the length of the character recognition result of the candidate lighted scheme.

[0089] For example, for formula (6), when the length of the first real string is the same as the length of the character recognition result, the second score is 1, and when the length of the first real string is different from the length of the character recognition result, the second score is 0.

[0090] For example, for formula (7), if the length of the first real string is less than or equal to the length of the character corresponding to the character recognition result, the second score is the ratio of the length of the first real string to the length of the character corresponding to the character recognition result. If the length of the first real string is greater than or the length of the character recognition result, the second score is the ratio of the length of the character corresponding to the character recognition result to the length of the first real string. The smaller the difference between the length of the first real string and the length of the character corresponding to the character recognition result, the higher the second score. The greater the difference between the length of the first real string and the length of the character corresponding to the character recognition result, the lower the second score.

[0091] In combination with the second aspect, in some implementations of the second aspect, the determining unit is specifically configured to determine the third score according to an edit distance between the first real string and the character recognition result of the candidate lighting scheme; or determine the third score according to a cosine similarity between the first real string and the character recognition result of the candidate lighting scheme; or determine the third score according to an Euclidean distance between the first real string and the character recognition result of the candidate lighting scheme.

[0092] For example, the edit distance refers to the minimum number of editing operations for converting the character recognition result into the first real string, and the editing operation can include inserting a character at any position, deleting a character at any position, and modifying a character at any position. The higher the similarity between the first real string and the character recognition result, the smaller the edit distance, and the higher the third score.

[0093] For example, the higher the similarity between the first real string and the character recognition result, the higher the cosine similarity between the first real string and the character recognition result, and the higher the third score.

[0094] For example, the higher the similarity between the first real string and the character recognition result, the smaller the Euclidean distance between the first real string and the character recognition result, and the higher the third score.

[0095] In combination with the second aspect, in some implementations of the second aspect, the score is a weighted sum of the first score, the second score, and the third score.

[0096] Based on the above technical scheme, when the first real string is known, the second score and the third score are introduced to determine the score together with the first score, so as to objectively and reasonably determine the lighting scheme for the first detection target, improve the quality of the lighting scheme, and further make the finally output character recognition result more accurate, and improve the character recognition accuracy of the product lighting image.

[0097] In combination with the second aspect, in some implementations of the second aspect, the photographing unit is further configured to light and photograph the second detection target according to the determined lighting scheme for the first detection target to obtain a lighting image of the second detection target; and the processing unit is further configured to perform character recognition on the lighting image of the second detection target by using the deep learning model to obtain a character recognition result of the second detection target when the lighting scheme for the first detection target is applied to the second detection target.

[0098] Based on the above technical scheme, since the determined lighting scheme for the first detection target is a relatively general scheme, when the first detection target is lighted for the first time, the lighting scheme for the first detection target can also be applied to the lighting operation of other detection targets, thereby improving the efficiency of character recognition on the surfaces of different products.

[0099] In combination with the second aspect, in some implementations of the second aspect, the determining unit is further configured to determine a first score of the lighting scheme for the first detection target when the lighting scheme for the first detection target is applied to the second detection target according to the character recognition result of the second detection target when the lighting scheme for the first detection target is applied to the second detection target; and when the first score of the lighting scheme for the first detection target when applied to the second detection target is higher than a first preset threshold, the lighting scheme for the first detection target is used to light the second detection target, wherein the first preset threshold is a positive number.

[0100] For example, when the first score of the lighting scheme for the first detection target when applied to the second detection target is not higher than the first preset threshold, the lighting scheme for the second detection target needs to be determined again, and the method implemented by the device in any one of the possible implementations of the device design of the above second aspect is executed to select the alternative lighting scheme corresponding to the highest first score as the lighting scheme for the second detection target.

[0101] Based on the above technical scheme, even if the difference between the first detection target and other detection targets is large, the lighting scheme can be automatically determined again, manual participation in subsequent lighting operation is reduced, the quality of the lighting scheme is further improved, and the character recognition accuracy and efficiency of the product image are improved.

[0102] With reference to the second aspect, in some implementations of the second aspect, the determining unit is further configured to determine a score of the lighting scheme of the first detection target when applied to the second detection target according to a second real string and a character recognition result of the second detection target when the lighting scheme of the first detection target is applied to the second detection target, the second real string being real character information of the surface of the second detection target; and when the score of the first detection target when applied to the second detection target is higher than a second preset threshold, the lighting scheme of the first detection target is used to light the second detection target, wherein the second preset threshold is a positive number.

[0103] For example, when the score of the first detection target when applied to the second detection target is not higher than the second preset threshold, the lighting scheme of the second detection target needs to be determined again, and the method implemented by the device in any one of the possible implementations of the device design of the second aspect is executed to select the lighting scheme corresponding to the highest score as the lighting scheme of the second detection target.

[0104] Based on the above technical solution, even if the difference between the first detection target and other detection targets is large, the lighting scheme can be automatically determined again, manual participation in subsequent lighting adjustment is reduced, the quality of the lighting scheme is further improved, and the character recognition accuracy and efficiency of the product image are improved.

[0105] In a third aspect, a device for determining a lighting scheme is provided, including a memory for storing computer instructions, and a processor for executing the computer instructions stored in the memory to cause the device to execute any one of the methods in the possible implementations of the method design of the first aspect.

[0106] In a fourth aspect, a computer storage medium is provided, and the computer storage medium stores computer instructions, which, when executed on a computer, cause the computer to execute any one of the methods in the possible implementations of the method design of the first aspect.

[0107] In a fifth aspect, a chip is provided, including a processor for executing any one of the methods in the possible implementations of the method design of the first aspect.

[0108] For example, the chip can be a baseband chip.

[0109] In a sixth aspect, a computer program product is provided, and the computer program code or instructions, when executed on a computer, cause the computer to execute any one of the methods in the possible implementations of the method design of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0110] Figure 1is a schematic diagram of a character recognition system 100 suitable for embodiments of the present application.

[0111] Figure 2 is a schematic diagram of a method for determining a lighting scheme according to an embodiment of the present application.

[0112] Figure 3 is a schematic diagram of a method for determining a lighting scheme according to another embodiment of the present application.

[0113] Figure 4 is a schematic diagram of a method for determining a first score according to an embodiment of the present application.

[0114] Figure 5 is a schematic diagram of a method for determining a lighting scheme according to another embodiment of the present application.

[0115] Figure 6 is a schematic block diagram of an apparatus 600 for determining a lighting scheme according to an embodiment of the present application. DETAILED DESCRIPTION

[0116] The technical solutions in the present application will be described below with reference to the accompanying drawings.

[0117] Figure 1 is a schematic diagram of a character recognition system 100 suitable for embodiments of the present application.

[0118] A character recognition system suitable for embodiments of the present application comprises a light source control system, an imaging system and a computing device. The computing device can be connected to the light source control system and the imaging system.

[0119] The light source control system comprises one or more light sources, each of which has at least one adjustable lighting parameter, such as the direction of emitted light, wavelength, brightness, color temperature, etc. The light source control system is used to adjust the lighting parameters of each light source according to a preset adjustment rule to obtain N alternative lighting schemes, where N is a positive integer. In embodiments of the present application, the preset adjustment rule can be to obtain different lighting parameter combinations by step adjustment of the parameters, thereby obtaining different alternative lighting schemes. However, the preset adjustment rule in the present application is not limited to the step-by-step method, and other methods can also be used, such as the fixed value setting method (i.e. using a fixed parameter combination), the function operation method (i.e. determining the lighting parameter combination according to a specific function relationship), the interval setting method (i.e. different settings can be used for different intervals, such as using the fixed value setting method in the first interval and the step-by-step method in the second interval), the reference reasoning method (i.e. reasoning the adjustment of the lighting parameters based on the reference of known lighting schemes to obtain new alternative lighting schemes), as long as the automatic adjustment of the alternative lighting schemes can be achieved.

[0120] In one embodiment, the light source control system includes one light source, the lighting parameter includes the emission light direction and the brightness, and the emission light direction is represented by the horizontal angle and the pitch angle. The adjustable range of the horizontal angle is [-30, 30], the adjustable range of the pitch angle is [-30, 30], the unit is degree, the single adjustable angle value is 30 degrees (i.e. the adjustment step is 30 degrees), the negative angle means the emission light is left-biased, and the positive angle means the emission light is right-biased. The brightness is directly represented by the brightness value, the adjustable range of the brightness is [6000, 10000], the unit is nit, and the single adjustable brightness is 2000 nit. Therefore, the preset adjustment rule proposed in the application can be to adjust the above lighting parameters in turn, and to combine each lighting parameter and its different values. Therefore, based on the above example, the following 27 alternative lighting schemes can be obtained at most:

[0121] Emission light direction: (-30, -30), brightness: 6000; emission light direction: (0, -30), brightness: 6000; emission light direction: (30, -30), brightness: 6000; emission light direction: (-30, 0), brightness: 6000; emission light direction: (0, 0), brightness: 6000; emission light direction: (30, 0), brightness: 6000; emission light direction: (-30, 30), brightness: 6000; emission light direction: (0, 30), brightness: 6000; emission light direction: (30, 30), brightness: 6000;

[0122] Emission light direction: (-30, -30), brightness: 8000; emission light direction: (0, -30), brightness: 8000; emission light direction: (30, -30), brightness: 8000; emission light direction: (-30, 0), brightness: 8000; emission light direction: (0, 0), brightness: 8000; emission light direction: (30, 0), brightness: 8000; emission light direction: (-30, 30), brightness: 8000; emission light direction: (0, 30), brightness: 8000; emission light direction: (30, 30), brightness: 8000;

[0123] Emission light direction: (-30, -30), brightness: 10000; emission light direction: (0, -30), brightness: 10000; emission light direction: (30, -30), brightness: 10000; emission light direction: (-30, 0), brightness: 10000; emission light direction: (0, 0), brightness: 10000; emission light direction: (30, 0), brightness: 10000; emission light direction: (-30, 30), brightness: 10000; emission light direction: (0, 30), brightness: 10000; emission light direction: (30, 30), brightness: 10000.

[0124] When there are multiple light sources, the above-mentioned way of determining the alternative lighting scheme is the same.

[0125] In some possible embodiments, the above-mentioned light source control system includes two modes: a recommended mode and a full scheme mode. Among them, the alternative lighting scheme determined in the recommended mode is the alternative lighting scheme that is used more frequently in the light source control system. For example, the following alternative lighting schemes in the above-mentioned embodiments:

[0126] Emitting light direction: (-30, 0), brightness: 8000; Emitting light direction: (0, 0), brightness: 8000; Emitting light direction: (0, 30), brightness: 8000;

[0127] Emitting light direction: (-30, 0), brightness: 8000; Emitting light direction: (0, 0), brightness: 8000; Emitting light direction: (0, 30), brightness: 8000;

[0128] Emitting light direction: (-30, 0), brightness: 10000; Emitting light direction: (0, 0), brightness: 10000; Emitting light direction: (0, 30), brightness: 10000;

[0129] And the full scheme mode is to adjust each lighting parameter in each light source in turn and combine them to determine all alternative lighting schemes that the current light source control system can combine, for example, all alternative lighting schemes in the above-mentioned embodiments.

[0130] As can be seen, although the full scheme mode needs to determine a selected lighting scheme from a large number of alternative lighting schemes, the time-consuming of determining the lighting scheme is longer than that of the recommended mode, but the accuracy of the finally determined lighting scheme is the highest. Although the recommended mode determines the lighting scheme faster, the number of alternative lighting schemes for comparison is limited, and the quality of the finally determined lighting scheme may not be as high as that of the lighting scheme in the full scheme mode. Therefore, the full scheme mode can be applied to the case where the light source control system determines the lighting scheme for the first time, and the recommended mode can be applied to the case where the light source control system determines the lighting scheme for the first time.

[0131] An imaging system includes one or more cameras that synchronously capture the target when the light source control system lights the target, obtaining N lighting images.

[0132] In some possible embodiments, the frequency of the imaging system needs to be equal to or greater than the frequency of the light source control system changing the lighting scheme, so as to ensure that at least one lighting image corresponds to each lighting scheme.

[0133] In order to reduce the load of image processing of the system, the imaging system records the interval between the time stamps of the light source control system changing the lighting scheme, and runs simultaneously with the light source control system to ensure time synchronization. When the imaging system takes multiple lighting images between two time stamps, the system will retain the lighting image with higher brightness among the lighting images.

[0134] In some possible embodiments, the imaging system described above includes multiple cameras, which respectively take the target under lighting according to different shooting angles, or different focal lengths, etc. Among them, different cameras in the same time stamp jointly take multiple lighting images of the target under the same lighting scheme. The imaging system can first perform the above image selection processing on the images taken by each camera, and retain the lighting image with higher brightness in the time stamp of each camera. The selected lighting images can be spliced into one lighting image. Therefore, one lighting scheme corresponds to one lighting image, whether the lighting image includes one picture or multiple spliced pictures.

[0135] It should be understood that when the imaging system includes only one camera, one lighting image includes only one picture. When the imaging system includes multiple cameras, one lighting image includes multiple spliced pictures.

[0136] The computing device includes a processor, a memory, a communication interface, a transmitter, and a receiver. It has computing capability and can be used to send indication information to the light source control system and the imaging system, instructing the light source control system to generate a lighting scheme and light the target, and instructing the imaging system to take pictures, etc. The computing device can also be used to receive N lighting images from the imaging system.

[0137] In some possible embodiments, the computing device described above can be a server. The server can be a local server or a cloud server, and the embodiments of the present application do not limit this.

[0138] In some possible embodiments, the processor described above can be a central processing unit (CPU) or a graphics processing unit (GPU), etc. The processor described above can be used to pre-process the obtained lighting images; can also be used to perform character recognition on the lighting images according to a deep learning model; and can also be used to score N alternative lighting schemes corresponding to N lighting images, and select the finally selected lighting scheme. It should be understood that the character recognition result output by the character recognition on the lighting image corresponding to the finally selected lighting scheme is also relatively accurate.

[0139] In some possible embodiments, the memory described above can be a random access memory (RAM) or a non-volatile memory (NVM), etc. The memory described above can be used to store data required by the processor in the calculation process; can also be used to store the character recognition result of the processor, etc.; and can also be used to save the lighting scheme, the lighting image, and the score thereof, etc.

[0140] In some possible embodiments, the communication interface is configured to communicate with other devices, such as user devices such as displays, keyboards, etc. The processor, the memory, and the communication interface described above communicate through a bus. The bus can include a data bus, a power bus, a control bus, and a status signal bus, etc.

[0141] In some possible embodiments, the receiver and the transmitter can be configured to receive information or data from other devices or systems, etc. The receiver can be configured to receive the lighting image from the imaging system, or can be configured to receive the lighting image from the device for controlling the imaging system; and the transmitter can be configured to send the lighting scheme or the indication information to the light source control system, or can be configured to send the lighting scheme or the indication information to the device for controlling the light source control system.

[0142] Based on the system provided above, the embodiment of the present application provides a method for determining a lighting scheme.

[0143] Figure 2 is a method flow diagram for determining a lighting scheme provided by the embodiment of the present application.

[0144] S210: According to N alternative lighting schemes, the first detection target is respectively lighted and photographed to obtain N lighting images respectively corresponding to the N alternative lighting schemes.

[0145] The N alternative lighting schemes are obtained by adjusting the lighting parameters of the light source according to a preset adjustment rule. The preset adjustment rule can refer to the corresponding description in the foregoing embodiments. The lighting parameters include at least one of the following adjustable parameters: the direction of emitted light, the wavelength, the brightness, the color temperature, and the number of light sources.

[0146] It should be understood that the light source used for lighting the target can be composed of multiple sub-light sources. Therefore, the number of light sources can be used as a lighting parameter.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of obtaining N alternative lighting schemes and obtaining N lighting images can refer to the corresponding process in the foregoing embodiments, which will not be described herein.

[0148] S220: Perform character recognition on the N lighted images by the deep learning model to obtain character recognition results of the N alternative light schemes.

[0149] In some possible embodiments, the deep learning model described above can be an OCR model. Perform character recognition on each of the N lighted images by the OCR model to obtain character recognition results of the N alternative light schemes.

[0150] S230: Determine the light scheme for the first detection target from the N alternative light schemes according to the character recognition results of the N alternative light schemes.

[0151] It should be understood that the character recognition result of the finally determined light scheme for the first detection target is clearer and more accurate than the character recognition results of other alternative light schemes. Therefore, the finally output character recognition result is also relatively accurate.

[0152] Based on the technical solution described above, by automatically adjusting the light parameters of the light source, determining available alternative light schemes, performing character recognition on the lighted images obtained based on each light scheme respectively, and according to the character recognition results, an alternative light scheme that is relatively suitable can be objectively selected from the multiple alternative light schemes, thereby reducing the influence of artificial subjective judgment when determining the light scheme, improving the quality of the light scheme, and further improving the character recognition accuracy and efficiency of the product image. Meanwhile, the adjustment of the alternative light scheme can be automatically performed without the need for manual adjustment based on experience, thereby improving the selection efficiency and providing a more suitable light scheme.

[0153] Specifically, when character detection needs to be performed on a certain type of detection target (e.g., characters on a wafer, a circuit board, or a mechanical device), different types of detection targets can be suitable for different light schemes. In a traditional scheme, a limited number of alternative light schemes need to be set by artificial experience, and then it is determined one by one whether they are suitable for the current detection target. However, this method is not only low in efficiency, but also cannot guarantee that the most suitable light scheme is selected. The embodiments of the present application automate the entire process including the obtaining of alternative light schemes, the acquisition of lighted images, the character recognition of lighted images, and the selection of light schemes, which can greatly reduce the influence of artificial subjective judgment in the setting and selection process of the light scheme, and can provide a more suitable light scheme, thereby improving the character recognition accuracy of the product image.

[0154] In some possible embodiments, before performing character recognition on the N lighted images by the deep learning model respectively, the obtained lighted images can also be subjected to image preprocessing, which includes image flipping, image rotation, Gaussian filtering, erosion and expansion, and the like.

[0155] Based on the technical solution, the accuracy of character recognition of the lighted image can be effectively improved, and the lighted image is more easily recognized.

[0156] In addition, when the lighted image is clear enough or easy to recognize characters, the lighted image can be directly recognized, without the image preprocessing operation.

[0157] In some possible embodiments, based on S230, the embodiment of the present application further provides another method for determining a light scheme.

[0158] Figure 3 is a flowchart of another method for determining a light scheme provided by the embodiment of the present application.

[0159] S310: For each lighted image, determine the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of each character in the lighted image, and determine the score of the lighted image according to the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of each character in the lighted image.

[0160] In some possible embodiments, the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of each character in the lighted image can be determined by the OCR model, and the first score corresponding to each lighted image can be determined according to the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of each character in the lighted image. The first score can be the score of the lighted image, and the confidence of each character can be a deep network inference confidence.

[0161] It should be understood that, in addition to the OCR model, the deep learning model can also be other deep learning models capable of recognizing the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of characters, and the embodiment of the present application does not limit this.

[0162] S320: Determine the light scheme corresponding to the lighted image with the highest score as the light scheme for the first detection target.

[0163] It should be understood that when the score is the first score, the light quality of the light scheme corresponding to the highest first score is the best, so that each character recognized based on the light scheme is the clearest, and further, the character recognition result is the relatively most accurate character recognition result.

[0164] Based on the technical scheme, the minimum circumscribed rectangle position, the minimum circumscribed rectangle area and the confidence of each character in the lighted image are used to determine the first score, and the current lighted scheme is objectively evaluated according to the first score. Since the standard of the first score is objective and unified, the subjective factors caused by manual evaluation are reduced, the quality of the lighted scheme is improved, and the character recognition accuracy of the product lighted image is improved.

[0165] As can be seen from the above description of the embodiments, the first score can be determined by the minimum circumscribed rectangle position, the minimum circumscribed rectangle area and the confidence of each character in the lighted image. Therefore, the embodiments of the present application further provide a method for determining the first score.

[0166] Figure 4 A flowchart of a method for determining the first score provided by the embodiments of the present application is shown.

[0167] S410: According to the position of the minimum circumscribed rectangle of each character in the lighted image, a clustering model is used to determine J character region blocks in the lighted image, wherein each character region block includes I characters.

[0168] Wherein, I and J are positive integers.

[0169] In some possible embodiments, the clustering model is mainly used to divide a larger character region into J local parts, and the I characters in each local part are mutually adjacent or similar characters. By performing character recognition on each local part, the accuracy of character recognition can be effectively improved. The clustering model applied to the embodiments of the present application can include a K-means clustering algorithm, a system clustering algorithm, etc.

[0170] It should be understood that when there is only one character in the lighted image, the lighted image can also be subjected to a clustering operation first, and the result after the clustering operation is that the lighted image has only one local part, and the local part has only one character.

[0171] S420: According to the confidence of each character in each character region block, a character confidence average value of each character region block of the lighted image is determined.

[0172] In some possible embodiments, the character confidence average value of the character region block of the lighted image can be determined according to the following formula (1):

[0173]

[0174] Wherein, represents the confidence of the i-th character in the j-th character region block, avgp jrepresents the average value of the character confidence of the jth character region block, j is a positive integer less than or equal to J, and i is a positive integer less than or equal to I.

[0175] It should be understood that the average value of the character confidence obtained by the above formula (1) is the average value of the character confidence corresponding to a character region block in an illuminated image. Since there are J character region blocks in an illuminated image, an illuminated image should correspond to J average values of the character confidence, and each average value of the character confidence is calculated by averaging the confidence of I characters.

[0176] In an embodiment, the above-mentioned confidence can be determined by a neural network model based on deep learning, and ranges from 0 to 1. The closer to 1, the greater the probability that the model judges that the character belongs to the specified category.

[0177] For example, there are 10 illuminated images, and each illuminated image has only one number, 0-9. At this time, the pictures can be divided into Char0-Char9, a total of 10 categories, and the illuminated images are labeled with their corresponding labels. Then each picture is input into a neural network classifier for training. During the training process, the parameters in the neural network model are automatically adjusted so that the final output of the neural network model is consistent with the labeled label. At this point, the neural network model has learned how to recognize the 10 categories of numbers 0-9.

[0178] However, in fact, the recognition result output by the neural network model may not be completely consistent, so the output of the neural network model may be as follows:

[0179] The probability of classifying the current picture as Char0 is 0.25, the probability of classifying as Char1 is 0.57; the probability of classifying as Char2 is 0.12; the probability of classifying as Char3 is 0.24; the probability of classifying as Char4 is 0.54; the probability of classifying as Char5 is 0.14; the probability of classifying as Char6 is 0.28; the probability of classifying as Char7 is 0.58; the probability of classifying as Char8 is 0.99; and the probability of classifying as Char9 is 0.05.

[0180] At this time, the classification Char8 with the highest probability, which corresponds to the number 8, can be taken as the recognition result of the character, and the confidence is 0.99, and the character confidence is obtained.

[0181] S430: Determine the average value of the character bounding box area of each character region block of the illuminated image according to the minimum bounding box area of each character in each character region block.

[0182] In some possible embodiments, the average value of the character bounding box area of the character region block of the illuminated image can be determined according to the following formula (2):

[0183]

[0184] wherein, represents the minimum circumscribed rectangle area of the i-th character in the j-th character region block, avgp j represents the average value of the character circumscribed rectangle area of the j-th character region block.

[0185] Similar to the determination of the average value of the character confidence, the average value of the character circumscribed rectangle area is the average value of the character circumscribed rectangle area corresponding to a character region block in a lighted image. Since there are J character region blocks in a lighted image, a lighted image should correspond to J average values of the character circumscribed rectangle area, and each average value of the character circumscribed rectangle area is calculated by averaging the minimum circumscribed rectangle areas of I characters.

[0186] S440: determining a first character region block of the lighted image according to the average value of the character confidence and the average value of the character circumscribed rectangle area of the lighted image.

[0187] In some possible embodiments, the first character region block of the lighted image can be determined by the standard deviation of the character confidence in each character region block of the lighted image and the standard deviation of the character circumscribed rectangle area in each character region block: determining the standard deviation of the character confidence and the standard deviation of the character circumscribed rectangle area of each character region block of the J character region blocks according to the average value of the character confidence and the average value of the character circumscribed rectangle area of the lighted image; determining the character region block with the minimum sum of the standard deviation of the character confidence and the standard deviation of the character circumscribed rectangle area as the first character region block.

[0188] Taking the j-th character region block as an example, the standard deviation of the character confidence in the j-th character region block can be determined according to the following formula (3):

[0189]

[0190] The standard deviation of the character circumscribed rectangle area in the j-th character region block can be determined according to the following formula (4):

[0191]

[0192] wherein, std_avgp j represents the standard deviation of the character confidence of the j-th character region block, std_avga j represents the standard deviation of the character circumscribed rectangle area in the j-th character region block.

[0193] Then, the standard deviation of the character confidence of each character region block in the lighted image and the standard deviation of the area of the character bounding rectangle are added to obtain a comprehensive standard deviation. Since a picture includes J character region blocks, J comprehensive standard deviations are obtained, and the minimum standard deviation is selected from the comprehensive standard deviations. The character region block corresponding to the minimum standard deviation is the first character region block. In std_avgp j The sum of the std_avgp j The sum of the std_avgp

[0194] It should be understood that the area of the minimum bounding rectangle between each character in the first character region block is the most average, and the character confidence between each character is the closest.

[0195] S450: Determine the first score according to the average value of the character confidence and the average value of the character bounding rectangle area corresponding to the first character region block of the lighted image.

[0196] In some possible embodiments, the above-mentioned first score mainly includes two parts. The first part has a positive correlation with the average value of the character confidence of the first character region block of the lighted image. That is, the greater the average value of the character confidence of the first character region block of the lighted image, the higher the overall confidence of the recognized character, and the greater the value of the first part. The second part has a negative correlation with the standard deviation of the average value of the character bounding rectangle area of the first character region block of the lighted image. That is, the greater the standard deviation of the average value of the character bounding rectangle area of the first character region block of the lighted image, the more irregular the recognized character, and the smaller the value of the second part. Adding the two parts can represent that the higher the above-mentioned first score when the string of characters is more regular and the confidence is higher.

[0197] In some possible embodiments, other constants or variables can be introduced into the above-mentioned first score to expand the score factors considered when determining the above-mentioned first score.

[0198] It should be understood that the second part of the above-mentioned first score can represent whether the recognized character size is uniform and regular, which mainly includes two cases:

[0199] The first case is that the recognized character size is not uniform and regular due to defects in the lighted scheme. At this time, even if the average value of the character confidence corresponding to the recognized character is high, since the size of the recognized character is not uniform and regular, the above-mentioned first score is lowered, so it cannot become the highest score among the N first scores determined.

[0200] The second case is that the character distribution in the lighted image is not uniform and neat by itself, but the characters in each character region in the obtained lighted image can be incomplete due to defects in the lighted scheme. Because the characters are incomplete, the average value of the character bounding rectangle area of the character region is relatively close, which further leads to the standard deviation of the character bounding rectangle area close to 0. However, the average value of the character confidence determined in this case will be very low, which will lower the first score as a whole, and it cannot become the highest score compared with other determined first scores. For a better lighted scheme, because the character distribution is not uniform and neat by itself, even if the standard deviation of the character bounding rectangle area of the character region is large, it usually does not lower the first score too much.

[0201] Based on the above technical solution, the first score corresponding to the candidate lighted scheme can be objectively and uniformly determined by the above method, and then a more appropriate lighted scheme can be selected, which reduces the influence of artificial subjective judgment in determining the lighted scheme, selects a suitable lighted scheme as the target lighted scheme, improves the quality of the lighted scheme, and further improves the character recognition accuracy of the product image.

[0202] In some possible embodiments, for the scene of selecting a lighted scheme for the first detection target, the lighted scheme corresponding to the highest first score can be determined as the finally selected lighted scheme for the first detection target. Because the lighted scheme is a relatively general lighted scheme, when the second detection target is lighted, the second detection target can also be lighted and photographed according to the lighted scheme for the first detection target to obtain a lighted image of the second detection target, and the subsequent character recognition process is performed.

[0203] However, even if the determined lighted scheme for the first detection target is selected to light the second detection target, after obtaining the lighted image of the second detection target, the lighted image still needs to be subjected to the above scoring operation to determine the first score. When the first score is higher than the first preset threshold, the lighted scheme for the first detection target is used to light the second detection target, and the character recognition result is output.

[0204] The first preset threshold is a positive number, which can be 1.0, 1.2, or other reasonable thresholds.

[0205] It should be understood that when the first detection target and the second detection target are the same or similar products, the lighting scheme determined for the first detection target can generally be used. However, when the first detection target and the second detection target are different in type and have a large difference in structure, the lighting scheme for the first detection target cannot be used. At this time, the first score of the lighting scheme determined for the second detection target can be lower than the first preset threshold, so the lighting parameters need to be adjusted, the N candidate lighting schemes are determined again, and the steps of S210-S230, S310-S320, S410-S450 are performed again to determine the appropriate lighting scheme for the second detection target.

[0206] Based on the above technical solution, since the determined lighting scheme for the first detection target is a relatively general scheme, when the first detection target is first lighted, if the differences between other detection targets and the first detection target are not large, the previously determined lighting scheme for the first detection target can also be applied to the lighting operation of other detection targets, thereby improving the efficiency of character recognition on the surfaces of different products. Even if the differences between the first detection target and other detection targets are large, the lighting scheme can be automatically determined again to reduce the manual participation in subsequent light adjustment operations, further improve the quality of the lighting scheme, and further improve the character recognition accuracy and efficiency of the product image.

[0207] In some possible embodiments, when the lighting scheme for the first detection target is determined, the lighting scheme and the first detection target information can be stored in the local or server. For the detection target subjected to subsequent lighting, the finally determined lighting scheme thereof can also be stored in the local or server.

[0208] Taking lighting of the second detection target as an example, before the second detection target is lighted, information of the second detection target can be determined first, and it is checked whether the determined lighting scheme for the second detection target is stored, that is, whether the second detection target is a historical target.

[0209] If the checking succeeds, the found lighting scheme is directly used for the lighting operation of the second detection target, and character recognition is performed on the lighted image.

[0210] If the checking fails, the lighting scheme finally used for the last lighting target is used.

[0211] For example, the last time the light target is the first detection target, the light scheme for the first detection target is determined, so the light scheme for the first detection target is used first to light the second detection target, and the first score of the light picture corresponding to the light scheme is determined. If the first score at this time is not higher than the first preset threshold, the light parameter is adjusted, the N alternative light schemes are determined again, and the steps of S210-S230, S310-S320, S410-S450 are performed again to determine the light scheme of the second detection target, and finally the light scheme for the second detection target is determined.

[0212] Based on the above technical solution, the light scheme determined in the history can be stored, and when the light operation is performed on the historical target again, the light scheme corresponding to the historical target can be called to perform the light operation, so that the light scheme is optimal for the target, and the repeated determination of the light scheme is avoided, the efficiency of determining the light scheme is improved, and the efficiency of character recognition on the surface of the product is further improved.

[0213] Based on the above embodiment, the present embodiment provides another method for determining a light scheme: a second score and a third score are introduced, and the scores are determined together with the first score to determine the highest score corresponding to the alternative light scheme as the light scheme for the first detection target, so that the finally determined light scheme is more suitable and the light quality is higher.

[0214] Figure 5 A flowchart of another method for determining a light scheme provided by an embodiment of the present application is shown.

[0215] S510: determining a second score according to the length of the first real string and the length of the character recognition result of the alternative light scheme.

[0216] The first real string is the real character information of the surface of the first detection target.

[0217] In some possible embodiments, the second score can be determined by comparing the difference between the length of the first real string of the light image and the length of the character recognition result of the alternative light scheme. For example, the second score can be determined according to the following formula (5):

[0218]

[0219] Wherein, score2 represents the second score, l true represents the length of the first real string of the light image, l ocr represents the length of the character recognition result of the alternative light scheme.

[0220] It should be understood that when the difference between the length of the first real string and the length of the character recognition result is 0 after comparison, the second score is 1, and when the difference between the length of the first real string and the length of the character recognition result is not 0, the second score is 0.

[0221] In some possible embodiments, the second score can also be determined by other transformations of the difference between the length of the first real string and the length of the character recognition result of the illuminated image. For example, the second score can be determined according to formula (6) as follows:

[0222]

[0223] It should be understood that if the length of the first real string is less than or equal to the length of the character corresponding to the character recognition result, the second score is the ratio of the length of the first real string to the length of the character corresponding to the character recognition result.

[0224] If the length of the first real string is greater than or the length of the character recognition result, the second score is the ratio of the length of the character corresponding to the character recognition result to the length of the first real string.

[0225] The smaller the difference between the length of the first real string and the length of the character corresponding to the character recognition result, the higher the second score.

[0226] The greater the difference between the length of the first real string and the length of the character corresponding to the character recognition result, the lower the second score.

[0227] S520: Determine a third score according to the similarity between the first real string and the character recognition result of the alternative lighting scheme.

[0228] In some possible embodiments, the third score can be determined according to the edit distance between the first real string and the character recognition result of the alternative lighting scheme.

[0229] It should be understood that the edit distance refers to the minimum number of editing operations for converting the character recognition result into the first real string, and the editing operation can include inserting a character at any position, deleting a character at any position, and modifying a character at any position. In the embodiments of the present application, the higher the similarity between the first real string and the character recognition result, the smaller the edit distance, and the higher the third score, for example, closer to 1.

[0230] Alternatively, the third score can also be determined according to the cosine similarity between the first real string and the character recognition result of the alternative lighting scheme.

[0231] It should be understood that the cosine similarity measures the similarity between two vectors by measuring the cosine value of the included angle between the two vectors. The cosine value of a 0-degree angle is 1, the cosine value of any other angle is not greater than 1, and the minimum value is -1. Thus, according to the cosine value of the angle between two vectors, it can be determined whether the two vectors point in substantially the same direction. When the two vectors have the same direction, the value of the cosine similarity is 1; when the two vectors have an included angle of 90°, the value of the cosine similarity is 0; and when the two vectors point in completely opposite directions, the value of the cosine similarity is -1. In the embodiments of the present application, the higher the similarity between the first real string and the character recognition result, the higher the cosine similarity between the first real string and the character recognition result, and the higher the third score, for example, closer to 1.

[0232] Alternatively, the third score can also be determined according to the Euclidean distance between the first real string and the character recognition result of the alternative lighting scheme.

[0233] It should be understood that the Euclidean distance is a distance measure that measures the absolute distance between points in a multi-dimensional space, wherein the distance measure is used to measure the distance between individuals in space, and the farther the distance, the greater the difference between individuals. In the embodiments of the present application, the higher the similarity between the first real string and the character recognition result, the smaller the Euclidean distance between the first real string and the character recognition result, and the higher the third score, for example, closer to 1.

[0234] S530: Determine the above score according to the first score, the second score, and the third score.

[0235] In some possible embodiments, the above score is a weighted sum of the above first score, the above second score, and the above third score.

[0236] In some possible embodiments, the above first score, the above second score, and the above third score can be weighted by preset weights λ1, λ2, and λ3, respectively. The preset weights can be pre-set or directly modified in subsequent processes, and the embodiments of the present application do not limit this. And λ1, λ2, and λ3 can satisfy the following condition: λ1+λ2+λ3=1. Further, the value range of λ1 can be [0.5, 0.8], the value range of λ2 can be [0.1, 0.25], and the value range of λ3 can be [0.1, 0.25].

[0237] S540: When the score is the current highest score, determine that the alternative lighting scheme corresponding to the highest score is the current lighting scheme for the first detection target.

[0238] Based on the above technical scheme, when the first real string is known, the second score and the third score are introduced to determine the score together with the first score, so that the determined lighting scheme for the first detection target is more objective and reasonable, and the output character recognition result is more accurate.

[0239] In some possible embodiments, for the scene of selecting a lighting scheme for the first detection target, the lighting scheme corresponding to the highest score can be determined as the final selected lighting scheme for the first detection target. Since the lighting scheme is a relatively general lighting scheme, when the second detection target is lighted, the second detection target can also be lighted according to the lighting scheme for the first detection target, and a lighted image of the second detection target is obtained by photographing, and a subsequent character recognition process is performed.

[0240] However, even if the determined lighting scheme for the first detection target is selected to light the second detection target, after obtaining the lighted image of the second detection target, the lighted image still needs to be subjected to the above scoring operation to determine the score. When the score is higher than the second preset threshold, the lighting scheme for the first detection target is used to light the second detection target, and a character recognition result is output.

[0241] The second preset threshold is a positive number, which can be a reasonable threshold value such as 1.25, 1.5, etc.

[0242] It should be understood that when the first detection target and the second detection target are the same or similar products, the lighting scheme determined for the first detection target can generally be used. However, when the types of the first detection target and the second detection target are different, and the structures thereof are quite different, the lighting scheme for the first detection target cannot be used. At this time, the score of the lighting scheme determined for the second detection target can be lower than the second preset threshold, so it is necessary to adjust the lighting parameters, re-determine the N lighting schemes, and then perform the steps of S210-S230, S310-S320, S410-S450, S510-S540 to re-determine a suitable lighting scheme for the second detection target.

[0243] Based on the above technical scheme, since the determined lighting scheme for the first detection target is a relatively general scheme, when the difference between other detection targets and the first detection target is not large, the previously determined lighting scheme for the first detection target can also be applied to light other detection targets. The efficiency of character recognition on the surface of different products is improved. Even if the difference between the first detection target and other detection targets is large, the lighting scheme can also be automatically re-determined to reduce the manual participation in subsequent light adjustment operations, further improve the quality of the lighting scheme, and further improve the character recognition accuracy of the product image.

[0244] In some possible embodiments, after determining the lighting scheme for the first detection target, the lighting scheme and the first detection target information can be stored in the local or server. For the detection target to be lighted subsequently, the finally determined lighting scheme thereof can also be stored in the local or server.

[0245] Taking lighting of the second detection target as an example, before lighting the second detection target, information of the second detection target can be determined first, and it is determined whether the determined lighting scheme for the second detection target is stored, that is, whether the second detection target is a historical target.

[0246] If the search is successful, the lighting scheme found is directly used to light the second detection target, and character recognition is performed on the lighted image.

[0247] If the search fails, the lighting scheme finally used for the last lighting target is followed.

[0248] For example, the last lighting target is the first detection target, and the lighting scheme for the first detection target is determined, so the lighting scheme for the first detection target is first followed to light the second detection target, and the score of the lighted image corresponding to the lighting scheme is determined. If the score is not higher than the second preset threshold value, the lighting parameters are adjusted, the N candidate lighting schemes are determined again, and the steps of S210-S230, S310-S330, S410-S450, S510-S540 are performed again to determine the lighting scheme of the second detection target, and finally the lighting scheme for the second detection target is determined.

[0249] Based on the above technical scheme, the historically determined lighting scheme can be stored, and when the historical target is lighted again, the lighting scheme corresponding to the historical target can be called to light the target, so that the lighting scheme is optimal for the target, and the situation of repeatedly determining the lighting scheme is avoided, the efficiency of determining the lighting scheme is improved, and the efficiency of character recognition on the surface of the product is further improved.

[0250] The embodiments of the present application also provide a device for implementing any one of the above methods, for example, a device for character recognition is provided, which includes units (or means) for implementing any one of the above methods.

[0251] Figure 6 A schematic block diagram of a device 600 for determining a lighting scheme is shown. As shown in the figure, the device 600 includes: Figure 6

[0252] ​The determining unit 610 is configured to adjust the lighting parameter of the light source according to a preset adjustment rule, and determine N candidate lighting schemes.

[0253] The photographing unit 620 is configured to light and photograph the first detection target according to the N candidate lighting schemes respectively, to obtain N lighting images respectively corresponding to the N candidate lighting schemes.

[0254] The processing unit 630 is configured to perform character recognition on the N lighting images by using a deep learning model, to obtain character recognition results of the N candidate lighting schemes.

[0255] The determining unit 610 is further configured to determine the lighting scheme for the first detection target from the N candidate lighting schemes according to the character recognition results of the N candidate lighting schemes, wherein N is a positive integer.

[0256] Optionally, the processing unit 630 is further configured to perform image preprocessing on the lighting image, and the image preprocessing includes image flipping, image rotation, Gaussian filtering, erosion and dilation.

[0257] Optionally, for each lighting image, the determining unit 610 is specifically configured to determine the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of each character in the lighting image, and determine the score of the lighting image according to the minimum bounding rectangle position, the minimum bounding rectangle area and the confidence of each character in the lighting image; and determine the candidate lighting scheme corresponding to the lighting image with the highest score as the lighting scheme for the first detection target.

[0258] Optionally, the determining unit 610 is specifically configured to determine J character region blocks in the lighting image by using a clustering model according to the minimum bounding rectangle position of each character in the lighting image, each character region block including I characters, wherein J and I are positive integers; determine the character confidence average value of each character region block of the lighting image according to the confidence of each character in each character region block; determine the character bounding rectangle area average value of each character region block of the lighting image according to the minimum bounding rectangle area of each character in each character region block; determine the first character region block of the lighting image according to the character confidence average value and the character bounding rectangle area average value of the lighting image; and determine the first score according to the character confidence average value and the character bounding rectangle area average value corresponding to the first character region block of the lighting image.

[0259] Optionally, when the first real string is known, the first real string is real character information of the first detection target surface, and the determination unit 610 is specifically configured to determine a second score according to a length of the first real string and a length of a character recognition result of the candidate lighting scheme, the first real string being known real character information of the first detection target surface; determine a third score according to a similarity between the first real string and the character recognition result of the candidate lighting scheme; and determine the score according to the first score, the second score and the third score.

[0260] Optionally, the determination unit 610 is specifically configured to determine the third score according to an edit distance between the first real string and the character recognition result of the candidate lighting scheme; or determine the third score according to a cosine similarity between the first real string and the character recognition result of the candidate lighting scheme; or determine the third score according to an Euclidean distance between the first real string and the character recognition result of the candidate lighting scheme.

[0261] Optionally, the shooting unit 620 is further configured to light and shoot the second detection target according to the determined lighting scheme for the first detection target to obtain a lighted image of the second detection target, and the processing unit 630 is further configured to perform character recognition on the lighted image of the second detection target by using the deep learning model to obtain a character recognition result when the lighting scheme for the first detection target is applied to the second detection target.

[0262] Optionally, the determination unit 610 is further configured to determine a first score when the lighting scheme for the first detection target is applied to the second detection target according to the character recognition result, and light the second detection target with the lighting scheme of the first detection target when the first score is higher than a first preset threshold, the first preset threshold being a positive number.

[0263] Optionally, when the second real string is known, the second real string is real character information of the second detection target surface, and the determination unit 610 is further configured to determine the score when the lighting scheme for the first detection target is applied to the second detection target according to the second real string and the character recognition result when the lighting scheme for the first detection target is applied to the second detection target, the second real string being known real character information of the second detection target surface, and light the second detection target with the lighting scheme of the first detection target when the score is higher than a second preset threshold when the lighting scheme for the first detection target is applied to the second detection target, the second preset threshold being a positive number.

[0264] It should be understood that the functions of the above-described determination unit 610 can be implemented by the computing device and the light source control system in the above-described embodiments. The functions of the above-described shooting unit 620 can be implemented by the imaging system in the above-described embodiments. The functions of the above-described processing unit 630 can be implemented by the computing device in the above-described embodiments.

[0265] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0266] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0267] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0268] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0269] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0270] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory, a magnetic disk or an optical disk, and various media that can store program codes.

[0271] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of determining a lighting scheme, characterized by, The method comprises: lighting and photographing the first detection target according to N alternative lighting schemes respectively to obtain N lighting images respectively corresponding to the N alternative lighting schemes, wherein the N alternative lighting schemes are obtained by adjusting lighting parameters of a light source according to a preset adjustment rule, and the lighting parameters comprise at least one of the following adjustable parameters: emission light direction, wavelength, brightness, color temperature, and number of light sources; performing character recognition on the N lighting images through a deep learning model to obtain character recognition results of the N alternative lighting schemes, wherein the character recognition results comprise minimum bounding rectangle positions, minimum bounding rectangle areas, and confidence levels of each character in the lighting images; determining J character region blocks in the lighting images through a clustering model according to the minimum bounding rectangle positions of each character, wherein each character region block comprises I characters, and the J and the I are positive integers; determining a character confidence level average value of each character region block of the lighting images according to the confidence levels of each character in the each character region block; determining a character bounding rectangle area average value of each character region block of the lighting images according to the minimum bounding rectangle areas of each character in the each character region block; determining a standard deviation of the character confidence level and a standard deviation of the character bounding rectangle area of each character region block of the J character region blocks according to the character confidence level average value and the character bounding rectangle area average value of the lighting images; determining a first character region block with a minimum sum of the standard deviation of the character confidence level and the standard deviation of the character bounding rectangle area; determining a first score according to the standard deviations of the character confidence level average value and the character bounding rectangle area average value corresponding to the first character region block of the lighting images; determining an alternative lighting scheme corresponding to a lighting image with the highest score as the lighting scheme for the first detection target.

2. The method of claim 1, wherein, The first score comprises a first part and a second part, wherein the first part is positively correlated with the character confidence level average value of the first character region block of the lighting image, and the second part is negatively correlated with the standard deviation of the character bounding rectangle area average value of the first character region block of the lighting image.

3. The method according to claim 1 or 2, characterized in that, The method further comprises: determining a second score according to a length of a first real string and a length of a character recognition result of the alternative lighting scheme, wherein the first real string is a known real character information of the first detection target surface; determining a third score according to a similarity between the first real string and the character recognition result of the alternative lighting scheme; determining the score according to the first score, the second score, and the third score.

4. The method of claim 3, wherein, The determination of the second score according to the length of the first real string and the length of the character recognition result of the alternative lighting scheme comprises: The second score is determined by comparing a difference between a length of the first real string and a length of the character recognition result of the alternative lighting scheme.

5. The method of claim 3, wherein, The third score is determined according to a similarity between the first real string and the character recognition result of the alternative lighting scheme, including: The third score is determined according to an edit distance between the first real string and the character recognition result of the alternative lighting scheme; or The third score is determined according to a cosine similarity between the first real string and the character recognition result of the alternative lighting scheme; or The third score is determined according to an Euclidean distance between the first real string and the character recognition result of the alternative lighting scheme.

6. The method of claim 3, wherein, The score is determined according to the first score, the second score and the third score, including: The score is determined according to a weighted sum of the first score, the second score and the third score.

7. The method of claim 3, wherein, The method further includes: lighting and photographing a second detection target according to the determined lighting scheme for the first detection target to obtain a lighting image of the second detection target; performing character recognition on the lighting image of the second detection target by the deep learning model to obtain a character recognition result of the second detection target when the lighting scheme of the first detection target is applied to the second detection target.

8. The method of claim 7, wherein, The method further includes: determining the first score of the lighting scheme of the first detection target when applied to the second detection target according to the character recognition result of the second detection target when the lighting scheme of the first detection target is applied to the second detection target; when the first score of the lighting scheme of the first detection target when applied to the second detection target is higher than a first preset threshold, lighting the second detection target by the lighting scheme of the first detection target, wherein the first preset threshold is a positive number.

9. The method of claim 7, wherein, The method further includes: determining the score of the lighting scheme of the first detection target when applied to the second detection target according to a second real string and the character recognition result of the second detection target when the lighting scheme of the first detection target is applied to the second detection target, the second real string being known real character information of a surface of the second detection target; when the score of the lighting scheme of the first detection target when applied to the second detection target is higher than a second preset threshold, lighting the second detection target by the lighting scheme of the first detection target, wherein the second preset threshold is a positive number.

10. An apparatus for determining a lighting scheme, characterized in that, The apparatus is configured to perform the method of any one of claims 1 to 9.

11. An apparatus for determining a lighting scheme, characterized in that, including: a memory configured to store computer instructions; a processor configured to execute the computer instructions stored in the memory to cause the apparatus to perform the method of any one of claims 1 to 9.

12. A computer storage medium, characterized in that The computer storage medium stores computer instructions, which when executed on a computer, cause the computer to perform the method of any one of claims 1 to 9.

13. A chip, characterized by including a processor configured to perform the method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Character detection method and device, detection equipment and storage medium

    CN111767908A

  • Dimming method, device and equipment

    CN113176270A