Light source parameter determination method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202510734849.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-12
AI Technical Summary
During the silicon wafer and chip manufacturing process, the engraved characters have low contrast and are affected by the material and background, resulting in complex light source parameter debugging, long cycles and poor reliability.
The character image is captured by the image acquisition device, the area to be recognized and the light source parameter combination are determined in response to user operations, character recognition is performed, and the optimal parameter combination is determined based on the recognition results.
The light source parameter debugging cycle is shortened, the debugging difficulty is reduced, the reliability of the parameter value is improved, and the automatic light source parameter setting is realized.
Smart Images

Figure CN120635905A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision technology, and in particular to a method, device, electronic device, and storage medium for determining light source parameters. Background Art
[0002] During the manufacturing process of silicon wafers and chips, characters are often engraved on their surfaces for identification purposes. This allows for traceability by identifying these characters. However, the process used for engraving these characters results in low contrast, and the characters are affected by the material of the silicon wafer and chip, as well as background interference, making it difficult to clearly image the characters. When capturing these characters, the parameters of the light source play a crucial role in ensuring the clarity of the character images.
[0003] In current related technologies, manual adjustments to light source parameters are required to ensure clear character imaging. This is a complex process, resulting in high difficulty and a long debugging cycle. Furthermore, it is often difficult to obtain optimal parameter values, resulting in poor reliability. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device, and storage medium for determining light source parameters to shorten the debugging cycle for light source parameters, reduce the debugging difficulty, and improve the reliability of parameter values. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for determining light source parameters, the method comprising:
[0006] In response to a region setting operation issued by a user for a character image displayed on a client interface, determining a region to be recognized set by the user for a character region in the character image, wherein the character image is acquired by an image acquisition device for the character to be recognized;
[0007] When the image acquisition device completes focusing on the area to be recognized, in response to a selection operation issued by the user with respect to a light source identifier displayed on the client interface, obtaining a character image captured by the image acquisition device when light source parameters of a target light source are different combinations of parameter values, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation;
[0008] Character recognition is performed on the character image to obtain an image recognition result, and based on the image recognition result, an optimal parameter value combination is determined from the parameter value combinations.
[0009] Optionally, the client interface displays a character image and a region setting trigger control;
[0010] The step of determining the area to be recognized set by the user for the character area in the character image in response to the area setting operation issued by the user for the character image displayed on the client interface includes:
[0011] In response to a trigger operation issued by a user for setting a trigger control for the area, following the user issuing a drawing operation for the character image, an icon of the image area indicated by the drawing operation is displayed;
[0012] In response to the confirmation operation issued by the user, the image area indicated by the drawing operation is used as the area to be recognized.
[0013] Optionally, the client interface displays an automatic focus trigger control, and / or the client interface displays a motor step value setting area;
[0014] Before the step of acquiring the character image by the image acquisition device in response to the user's selection operation on the light source identifier displayed on the client interface, in a case where the light source parameters of the target light source are different combinations of parameter values, the method further includes:
[0015] In response to a trigger operation issued by the user on the automatic focus trigger control, controlling the motor of the image acquisition device to rotate according to a preset motor step value to focus on the area to be identified; or
[0016] In response to the motor step value set by the user in the motor step value setting area, the motor of the image acquisition device is controlled to rotate according to the motor step value set by the user to focus on the area to be identified.
[0017] Optionally, the client interface displays an initial value setting area and a polling trigger control;
[0018] The step of acquiring, in response to the user's selection operation on the light source identifier displayed on the client interface, a character image captured by the image capture device when the light source parameters of the target light source are different parameter value combinations, comprises:
[0019] Acquiring the initial value of the light source parameter input by the user based on the initial value setting area;
[0020] In response to a selection operation issued by the user with respect to a light source identifier displayed on the client interface, determining a target light source corresponding to the light source identifier indicated by the selection operation;
[0021] In response to the trigger operation issued by the user for the polling trigger control, for the target light source, within the preset parameter value range, according to the preset step size, the light source parameters of the target light source are adjusted based on the initial value, so as to obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations.
[0022] Optionally, the client interface displays an image recognition result display area and an evaluation index setting area;
[0023] Before the step of performing character recognition on the character image to obtain an image recognition result, the method further includes:
[0024] Obtaining the evaluation index threshold and the character true value input by the user based on the evaluation index setting area;
[0025] The step of performing character recognition on the character image to obtain an image recognition result, and determining an optimal parameter value combination from the parameter value combinations based on the image recognition result, includes:
[0026] Performing character recognition on the character image to obtain character information and evaluation index results;
[0027] Determine a parameter value combination whose corresponding character information is the same as the character true value and whose corresponding evaluation index result is greater than the evaluation index threshold as a candidate parameter value combination;
[0028] Determining an optimal parameter value combination from the candidate parameter value combinations based on evaluation index results corresponding to the candidate parameter value combinations;
[0029] In the image recognition result display area, the character information, the evaluation index result and the optimal light source identifier are displayed, wherein the optimal light source identifier is the light source identifier corresponding to the light source to which the optimal parameter value combination belongs.
[0030] Optionally, the client interface displays a parameter write trigger control;
[0031] The method further comprises:
[0032] In response to a trigger operation issued by the user on the parameter write trigger control, the parameter value of the optimal light source is set to the optimal parameter value combination, wherein the optimal light source is the light source to which the optimal parameter value group belongs.
[0033] Optionally, the step of adjusting the light source parameters of the target light source based on the initial value within a preset parameter value range and in accordance with a preset step size to obtain character images captured by the image acquisition device when the light source parameters of the target light source have different parameter value combinations includes:
[0034] For each light source to be adjusted, for each light source parameter, the parameter values of the other light source parameters are kept unchanged, and the light source parameter of the light source to be adjusted is adjusted according to the preset parameter value range and preset step size corresponding to the light source parameter. Each time the light source parameter is adjusted, the character image captured by the image acquisition device is obtained, wherein, when the number of the target light sources is 1, the light source to be adjusted is the target light source, and when the number of the target light sources is multiple, the light source to be adjusted is each target light source and a target light source combination, and the target light source combination is composed of multiple light sources among the target light sources.
[0035] Optionally, for each light source to be adjusted, for each light source parameter, keeping the parameter values of other light source parameters unchanged, adjusting the light source parameter of the light source to be adjusted according to a preset parameter value range and a preset step size corresponding to the light source parameter, and each time the light source parameter is adjusted, obtaining a character image captured by the image acquisition device, includes:
[0036] For each light source to be adjusted, for each light source parameter, keep the parameter values of the other light source parameters unchanged, and adjust the light source parameter of the light source to be adjusted to the currently traversed parameter value. In the case of the first traversal, the currently traversed parameter value of the light source parameter is the lower limit of the preset parameter value range corresponding to the light source parameter;
[0037] Acquire a character image captured by the image acquisition device;
[0038] Update the currently traversed parameter value to the sum of the currently traversed parameter value of the light source parameter and the preset step size corresponding to the light source parameter, and return to the step of adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter.
[0039] In a second aspect, an embodiment of the present application provides a device for determining light source parameters, the device comprising:
[0040] a region setting module, configured to determine, in response to a region setting operation issued by a user for a character image displayed on a client interface, a region to be recognized set by the user for a character region in the character image, wherein the character image is acquired by an image acquisition device for the character to be recognized;
[0041] an image acquisition module, configured to, when the image acquisition device has focused on the area to be identified, obtain, in response to a selection operation initiated by the user with respect to a light source identifier displayed on the client interface, a character image captured by the image acquisition device when light source parameters of a target light source have different combinations of parameter values, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation;
[0042] The combination determination module is used to perform character recognition on the character image to obtain an image recognition result, and determine the best parameter value combination from the parameter value combinations based on the image recognition result.
[0043] Optionally, the client interface displays a character image and a region setting trigger control;
[0044] The regional setting module includes:
[0045] An icon display submodule, configured to respond to a trigger operation issued by a user for setting a trigger control for the area, and following the user issuing a drawing operation for the character image, display an icon of the image area indicated by the drawing operation;
[0046] The area setting submodule is configured to, in response to a confirmation operation issued by the user, use the image area indicated by the drawing operation as an area to be identified.
[0047] Optionally, the client interface displays an automatic focus trigger control, and / or the client interface displays a motor step value setting area;
[0048] The device further comprises:
[0049] a first focusing module, configured to control the motor of the image acquisition device to rotate according to a preset motor step value in response to a trigger operation issued by the user on the automatic focus trigger control, so as to focus on the area to be identified;
[0050] The second focusing module is used to respond to the motor step value set by the user in the motor step value setting area, and control the motor of the image acquisition device to rotate according to the motor step value set by the user to focus on the area to be identified.
[0051] Optionally, the client interface displays an initial value setting area and a polling trigger control;
[0052] The image acquisition module includes:
[0053] An initial value acquisition submodule, configured to acquire the initial value of the light source parameter input by the user based on the initial value setting area;
[0054] a target light source determination submodule, configured to, in response to a selection operation issued by the user with respect to the light source identifier displayed on the client interface, determine a target light source corresponding to the light source identifier indicated by the selection operation;
[0055] The image acquisition submodule is used to respond to the trigger operation issued by the user for the polling trigger control, and adjust the light source parameters of the target light source based on the initial value within the preset parameter value range and according to the preset step size, so as to obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations.
[0056] Optionally, the client interface displays an image recognition result display area and an evaluation index setting area;
[0057] The device further comprises:
[0058] An indicator acquisition module, configured to acquire the evaluation indicator threshold and the character true value input by the user based on the evaluation indicator setting area;
[0059] The combination determination module includes:
[0060] A character recognition submodule, configured to perform character recognition on the character image to obtain character information and evaluation index results;
[0061] a candidate combination determination submodule, configured to determine, as a candidate parameter value combination, a parameter value combination whose corresponding character information is the same as the character true value and whose corresponding evaluation index result is greater than the evaluation index threshold;
[0062] An optimal combination determination submodule, configured to determine an optimal parameter value combination from the candidate parameter value combinations based on evaluation index results corresponding to the candidate parameter value combinations;
[0063] The result display submodule is used to display the character information, the evaluation index results and the optimal light source identification in the image recognition result display area, wherein the optimal light source identification is the light source identification corresponding to the light source to which the optimal parameter value combination belongs.
[0064] Optionally, the client interface displays a parameter write trigger control;
[0065] The device further comprises:
[0066] The parameter value writing module is used to set the parameter value of the optimal light source to the optimal parameter value combination in response to the trigger operation issued by the user on the parameter writing trigger control, wherein the optimal light source is the light source belonging to the optimal parameter value group.
[0067] Optionally, the image acquisition submodule includes:
[0068] An image acquisition unit is configured to, for each light source to be adjusted, keep the parameter values of the other light source parameters unchanged, adjust the light source parameter of the light source to be adjusted according to a preset parameter value range and a preset step size corresponding to the light source parameter, and acquire a character image captured by the image acquisition device each time the light source parameter is adjusted, wherein, when the number of the target light sources is one, the light source to be adjusted is the target light source; when the number of the target light sources is multiple, the light source to be adjusted is each target light source and a target light source combination, and the target light source combination is composed of multiple light sources among the target light sources.
[0069] Optionally, the image acquisition unit includes:
[0070] a parameter value adjustment subunit, for each light source parameter to be adjusted, keeping the parameter values of the other light source parameters unchanged, and adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value, wherein, in the case of the first traversal, the currently traversed parameter value of the light source parameter is the lower limit of the preset parameter value range corresponding to the light source parameter;
[0071] An image acquisition subunit, configured to acquire the character image acquired by the image acquisition device;
[0072] The parameter value updating subunit is used to update the currently traversed parameter value to the sum of the currently traversed parameter value of the light source parameter and the preset step size corresponding to the light source parameter, and return to the step of adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter.
[0073] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0074] Memory for storing computer programs;
[0075] The processor is configured to implement any of the methods described in the first aspect above when executing a program stored in the memory.
[0076] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any of the methods described in the first aspect above.
[0077] Beneficial effects of the embodiments of the present application:
[0078] In the solution provided by the embodiment of the present application, in response to a user issuing an area setting operation for a character image displayed on a client interface, the electronic device can determine the area to be recognized set by the user for the character area in the character image, wherein the character image is obtained by an image acquisition device capturing the character to be recognized; when the image acquisition device completes focusing on the area to be recognized, in response to a user issuing a selection operation for a light source identifier displayed on the client interface, the electronic device obtains a character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation; character recognition is performed on the character image to obtain an image recognition result, and based on the image recognition result, the optimal parameter value combination is determined from the parameter value combinations. Since the clarity of the character to be recognized is affected by the light source turned on and the specific light source parameters when the character image is captured by the image acquisition device, the character image captured by the image acquisition device when the light source parameters of the target light source selected by the user are different parameter value combinations can be obtained. Furthermore, character recognition can be performed on the character image to obtain an image recognition result. For example, the image recognition result can include character information and confidence of the character to be recognized. Since the image recognition result and the light source parameters of the target light source are a certain parameter value combination, the resolvability of the characters to be recognized in the character image is related. The clarity of the characters to be recognized and the resolvability are positively correlated within a certain range, but the two are not equivalent. Therefore, the image recognition result is used as an evaluation indicator of the resolvability of the characters to be recognized, thereby converting the open-loop system between the image recognition result and the resolvability of the characters to be recognized into a closed-loop system, and the image recognition result is used as feedback excitation for the closed-loop system. The image recognition result, rather than the clarity of the characters to be recognized, is used to determine the optimal parameter value combination from the parameter value combination. In this way, the optimal parameter value combination can be determined by electronic equipment, and there is no need to manually debug the light source parameters or manually evaluate the resolvability of the characters to be recognized. Therefore, the debugging cycle for the light source parameters can be shortened, the debugging difficulty can be reduced, and the reliability of the parameter values can be improved.
[0079] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0081] Figure 1A flowchart of a method for determining light source parameters provided in an embodiment of the present application;
[0082] Figure 2 Based on Figure 1 A schematic diagram of a character image of the illustrated embodiment;
[0083] Figure 3 Based on Figure 1 A first schematic diagram of the client interface of the illustrated embodiment;
[0084] Figure 4 for Figure 1 A specific flow chart of step S101 in the embodiment shown;
[0085] Figure 5 Based on Figure 1 A second schematic diagram of the client interface of the illustrated embodiment;
[0086] Figure 6 Based on Figure 1 A schematic diagram of the relationship between the autocorrelation coefficient and image clarity in the illustrated embodiment;
[0087] Figure 7 Based on Figure 1 A third schematic diagram of the client interface of the illustrated embodiment;
[0088] Figure 8 for Figure 1 A specific flow chart of step S102 in the embodiment shown;
[0089] Figure 9 Based on Figure 1 A fourth schematic diagram of the client interface of the illustrated embodiment;
[0090] Figure 10 for Figure 1 A specific flow chart of step S103 in the embodiment shown;
[0091] Figure 11 Based on Figure 1 A flow chart of a character image acquisition method of the illustrated embodiment;
[0092] Figure 12 Based on Figure 1 A flow chart for determining an optimal parameter value combination according to the embodiment shown;
[0093] Figure 13 Based on Figure 1 A flow chart of determining the best parameter value combination by polling in the embodiment shown;
[0094] Figure 14A schematic diagram of the structure of a device for determining light source parameters provided in an embodiment of the present application;
[0095] Figure 15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0096] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0097] In order to shorten the debugging cycle for light source parameters, reduce the debugging difficulty, and improve the reliability of parameter values, embodiments of the present application provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for determining light source parameters. The following first introduces a method for determining light source parameters provided in embodiments of the present application.
[0098] The method for determining light source parameters provided in the embodiments of the present application can be applied to any electronic device that needs to determine light source parameters, for example, an image processor, an image processor, a processing device, etc., without specific limitation herein. For the sake of clarity, it will be referred to as an electronic device in the following text.
[0099] like Figure 1 As shown, a method for determining light source parameters includes:
[0100] S101, in response to a region setting operation issued by a user for a character image displayed on a client interface, determining a region to be recognized set by the user for a character region in the character image;
[0101] The character image is obtained by collecting the character to be recognized through an image collection device.
[0102] S102, when the image acquisition device has completed focusing on the area to be recognized, in response to a selection operation issued by the user with respect to a light source identifier displayed on the client interface, obtaining a character image captured by the image acquisition device when light source parameters of a target light source are different combinations of parameter values;
[0103] The target light source is the light source corresponding to the light source identifier targeted by the selection operation.
[0104] S103 , performing character recognition on the character image to obtain an image recognition result, and determining an optimal parameter value combination from the parameter value combinations based on the image recognition result.
[0105] It can be seen that in an embodiment of the present application, in response to a user's region setting operation for a character image displayed on a client interface, the electronic device can determine the region to be recognized set by the user for the character region in the character image, wherein the character image is obtained by capturing the character to be recognized through an image acquisition device; when the image acquisition device completes focusing on the region to be recognized, in response to a user's selection operation for a light source identifier displayed on the client interface, the character image captured by the image acquisition device is obtained when the light source parameters of the target light source are different parameter value combinations, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation; character recognition is performed on the character image to obtain an image recognition result, and based on the image recognition result, the optimal parameter value combination is determined from the parameter value combination. Since the clarity of the character to be recognized is affected by the light source turned on and the specific light source parameters when the character image is captured by the image acquisition device, the character image captured by the image acquisition device can be obtained when the light source parameters of the target light source selected by the user are different parameter value combinations. Furthermore, character recognition can be performed on the character image to obtain an image recognition result. For example, the image recognition result can include character information and confidence of the character to be recognized. Since the image recognition result and the light source parameters of the target light source are a certain parameter value combination, the resolvability of the characters to be recognized in the character image is related. The clarity of the characters to be recognized and the resolvability are positively correlated within a certain range, but the two are not equivalent. Therefore, the image recognition result is used as an evaluation indicator of the resolvability of the characters to be recognized, thereby converting the open-loop system between the image recognition result and the resolvability of the characters to be recognized into a closed-loop system, and the image recognition result is used as feedback excitation for the closed-loop system. The image recognition result, rather than the clarity of the characters to be recognized, is used to determine the optimal parameter value combination from the parameter value combination. In this way, the optimal parameter value combination can be determined by electronic equipment, and there is no need to manually debug the light source parameters or manually evaluate the resolvability of the characters to be recognized. Therefore, the debugging cycle for the light source parameters can be shortened, the debugging difficulty can be reduced, and the reliability of the parameter values can be improved.
[0106] In the process of determining light source parameters, to facilitate user settings of various parameters, embodiments of the present application provide a client interface that can interact with the user. The client interface can display character images, where the character images are acquired by an image acquisition device of characters to be recognized, and the characters to be recognized can be OCR (Optical Character Recognition) characters engraved on the surface of a silicon chip or wafer.
[0107] For example, a schematic diagram of a character image can be as follows Figure 2As shown, the character image is obtained by collecting the characters to be recognized engraved on the surface of the wafer 201, and the characters to be recognized are ID002300 02.
[0108] In step S101, the user can issue an area setting operation for the above character image, and the electronic device can determine the area to be recognized set by the user for the character area in the character image. The area to be recognized can include the character area, and the shape of the area to be recognized can be rectangular, elliptical, etc.
[0109] Next, the electronic device can control the image acquisition device to focus on the area to be recognized. When the focus is complete, the user can perform a selection operation on the light source identifier displayed on the client interface. The light source identifier displayed on the client interface can be the identifier corresponding to the light source used to illuminate the character to be recognized, and the light source identifier can be used to uniquely identify the light source.
[0110] When capturing character images through an image capture device, the clarity of the characters to be recognized is affected by the light source that is turned on and the specific light source parameters. Therefore, in order to determine the light source and light source parameters that enable the characters to be recognized to be clearly imaged, in response to the user's selection operation on the light source identifier, the electronic device can obtain the character image captured by the image capture device when the light source parameters of the target light source are different parameter value combinations, that is, execute step S102.
[0111] The light source parameters may include exposure time, gain, gamma, and light source brightness, and the parameter value combination may be a combination determined by the parameter value of each light source parameter. The target light source may be the light source corresponding to the light source identifier targeted by the user's selection operation.
[0112] For example, the first schematic diagram of the client interface can be as follows Figure 3 As shown, the client interface is the interface corresponding to the wafer character recognition software. In the debugging area, there are a recipe column, a region lock column, a light source setting column, and a tuning column. In the light source setting column, 18 light source identifiers are displayed, namely light source 0 to light source 17. A selection box is displayed on the left side of each light source identifier. If the user wants to select a light source identifier, the user can click the selection box on the left side of the light source identifier. Figure 3 In FIG, the light sources selected by the user are identified as light source 6 and light source 7, and the target light source is the light source corresponding to light source 6 and light source 7.
[0113] Below the light source logo, there are also selection boxes for selecting all and unchecking them, as well as the exposure time set by the user, with a specific value of 1500μs. On the left side of the light source setting column, there is an area lock column, which includes selection buttons for field of view lock, horizontal flip, and vertical flip. On the left side of the area lock column, there is a recipe column, which can be used to switch the combination of configuration parameters to be configured, including recipe 1-recipe 8. On the right side of the light source setting column, there is a tuning column, which includes the prompt words corresponding to camera focus: Please start focusing after the image brightness is uniform, the trigger button corresponding to the selected area, the trigger button corresponding to autofocus, and the motor step value. The current setting value is 260.
[0114] Above the debugging area, a character image 301 is displayed. The true value of the character to be recognized is FA711708-09A6. Specific character parameters are displayed below and to the right of character image 301, including a resolution of 1408×1024, the current mouse position's X-axis coordinates of 1399 and 0242, and the intensity values of the red (R), green (G), and blue (B) channels of 255. A toggle button for real-time mode is displayed above character image 301.
[0115] The aforementioned toggle button can be used to switch between real-time mode and local mode. That is, if the user is currently in real-time mode and clicks the toggle button, the system will switch to local mode; if the user is currently in local mode and clicks the toggle button, the system will switch back to real-time mode. Real-time mode can be used to flip images, set initial values for light source parameters, and adjust the focus of the image acquisition device. Local mode can be used to poll for optimal parameter value combinations, write the optimal parameter value combinations to the image acquisition device, and write the optimal parameter value combinations to a local configuration file.
[0116] The bottom of the interface displays the communication address, operating status, currently selected recipe, and File Transfer Protocol (FTP) connection status. The communication address is XX.XXX.XX:XXXX, the operating status is Local, the currently selected recipe is Recipe 5, and the FTP connection status is Successful. The left side of the interface also displays selection buttons for the image display, parameter configuration, and algorithm platform.
[0117] In order to evaluate the resolvability of the characters to be recognized in the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations, the electronic device can perform character recognition on the character image to obtain an image recognition result, and based on the image recognition result, determine the optimal parameter value combination from the parameter value combination, that is, execute step S103.
[0118] The degree of resolvability indicates the degree to which the characters to be recognized in a character image can be clearly identified or correctly interpreted. The clarity of the characters to be recognized and the degree of resolvability are positively correlated within a certain range. Image recognition results can include character information of the characters to be recognized and evaluation index results. The character information can be the specific characters detected from the area to be recognized in the character image, and the evaluation index results can be confidence levels.
[0119] As an implementation method, the electronic device can determine the parameter value combination whose corresponding character information is the same as the preset character true value and whose corresponding evaluation index result is greater than the preset evaluation index threshold as a candidate parameter value combination, and then determine the candidate parameter value combination with the highest corresponding confidence as the optimal parameter value combination.
[0120] For example, the true value of a character is ABC123, and the evaluation index threshold is 0.95. Assuming that parameter value combination 1 corresponds to character information ADC123 and an evaluation index result of 0.50; parameter value combination 2 corresponds to character information ABC123 and an evaluation index result of 0.96; and parameter value combination 3 corresponds to character information ABC123 and an evaluation index result of 0.98, then parameter value combination 2 and parameter value combination 3 can be determined as candidate parameter value combinations. Furthermore, parameter value combination 3, which has the largest corresponding evaluation index result, can be determined as the optimal parameter value combination.
[0121] It can be seen that in the embodiment of the present application, since the clarity of the character to be recognized is affected by the light source turned on and the specific light source parameters when the character image is captured by the image capture device, it is possible to obtain the character image captured by the image capture device when the light source parameters of the target light source selected by the user are different parameter value combinations. Furthermore, character recognition can be performed on the character image to obtain an image recognition result. For example, the image recognition result can include character information and confidence of the character to be recognized. Since the image recognition result is related to the resolvability of the character to be recognized in the character image when the light source parameters of the target light source are a certain parameter value combination. The clarity of the character to be recognized and the resolvability are positively correlated within a certain range, but the two are not equivalent. Therefore, the image recognition result is used as an evaluation indicator of the resolvability of the character to be recognized, thereby converting the open-loop system between the image recognition result and the resolvability of the character to be recognized into a closed-loop system, and the image recognition result is used as feedback excitation for the closed-loop system. The optimal parameter value combination is determined from the parameter value combination based on the image recognition result, rather than the clarity of the character to be recognized. In this way, the optimal parameter value combination can be determined by electronic equipment, without the need to manually debug the light source parameters or manually evaluate the resolvability of the characters to be recognized. This can shorten the debugging cycle for the light source parameters, reduce the difficulty of debugging, and improve the reliability of the parameter values. Furthermore, the method for determining light source parameters provided in the embodiment of the present application is not limited to the type of image acquisition device, light source, or wafer, and can be applied to any result or type of light source system, thus having high practicality.
[0122] As an implementation of the embodiment of the present application, the above client interface may display a character image and a region setting trigger control. In this case, Figure 4 As shown, the step of determining the area to be recognized set by the user for the character area in the character image in response to the area setting operation issued by the user for the character image displayed on the client interface may include:
[0123] S401, in response to a trigger operation issued by a user for setting a trigger control for the area, following the user issuing a drawing operation for the character image, an icon of the image area indicated by the drawing operation is displayed;
[0124] When a user wants to set an area to be recognized, they can trigger an area setting trigger control displayed on the client interface. The area setting trigger control can be an icon in the form of a button. Next, the user can perform a drawing operation on the character image. During the above process, the electronic device can follow the user's drawing operation and display an icon for the image area indicated by the drawing operation. The icon for the image area can be the boundary of the area drawn by the user.
[0125] The above-mentioned drawing operation can be performed by dragging the mouse to draw each edge of the area, or by dragging the mouse to adjust the position of a vertex of the preset area, thereby adjusting the size of the preset area, or by adjusting the position of a certain edge to adaptively translate the entire preset area, thereby changing the position of the preset area. The specific method of the drawing operation is not limited here, as long as the image area can be drawn through the drawing operation.
[0126] For example, Figure 3 As shown, the user can click the area setting trigger control 302 with the mouse, and then issue a drawing operation on the character image 301. Next, the schematic diagram of the client interface can be as follows Figure 5 As shown, the electronic device can follow the user's drawing operation and display an icon 501 of the image area indicated by the drawing operation. Figure 5 and Figure 3 The only difference is the icon 501, so it is no longer Figure 5 The rest of the description is given in detail.
[0127] S402 : In response to a confirmation operation issued by the user, the image area indicated by the drawing operation is used as an area to be identified.
[0128] If the user believes that the size and location of the area represented by the icon in the currently displayed image area are unreasonable, the user can continue to adjust the image area through drawing operations until the user believes that the size and location of the area represented by the icon in the currently displayed image area are reasonable. The user can then issue a confirmation operation. The electronic device can then use the image area indicated by the drawing operation as the area to be recognized.
[0129] As can be seen, in the embodiment of the present application, in response to a user triggering an operation on a region setting trigger control, the electronic device can follow the user's drawing operation on a character image and display an icon for the image region indicated by the drawing operation; and in response to a user's confirmation operation, the image region indicated by the drawing operation is used as the region to be recognized. This makes it easier for users to set the region to be recognized through the client interface.
[0130] As an implementation manner of an embodiment of the present application, the above-mentioned client interface may display an automatic focus trigger control, and / or the above-mentioned client interface may display a motor step value setting area. In this case, in the above-mentioned response to the selection operation issued by the user for the light source identifier displayed on the client interface, when the light source parameters of the target light source are different parameter value combinations, before the step of the character image captured by the image acquisition device, the above-mentioned method may also include one of the following two implementation manners:
[0131] In response to the trigger operation issued by the user for the automatic focus trigger control, the motor of the image acquisition device is controlled to rotate according to a preset motor step value to focus on the area to be identified; or, in response to the motor step value set by the user in the motor step value setting area, the motor of the image acquisition device is controlled to rotate according to the motor step value set by the user to focus on the area to be identified.
[0132] To ensure a clear image of the character to be recognized, the distance between the image capture device's lens and the character to be recognized needs to be adjusted. During this adjustment process, the clarity of the character image captured in real time by the image capture device can be quantitatively evaluated to determine whether the image capture device has achieved focus.
[0133] If the image is blurry, it means that the high-frequency components of the image have been lost. Compared with images captured by the image acquisition device in a defocused state, images captured by the image acquisition device in a focused state contain more information and details. Common functions for evaluating the clarity of an image include: the sum of the absolute values of grayscale differences (Standard Deviation Multiplication, SMD), grayscale variance, Laplace function, square gradient, TenenGrad (gradient) function, image autocorrelation, entropy function, and bandpass filter function, etc.
[0134] Taking image autocorrelation as an example, image autocorrelation can be used to calculate the blurriness of an image, which in turn reflects the clarity of the image. The blurriness of an image can be determined by the standard autocorrelation coefficient of the offset between the image and a part of the image. The higher the autocorrelation coefficient, the higher the blurriness of the image. For example, a schematic diagram of the relationship between the autocorrelation coefficient and the clarity of an image can be shown as follows: Figure 6 As shown in the figure, the vertical axis represents the clarity of the image, and the horizontal axis represents the autocorrelation coefficient. As the autocorrelation coefficient increases, the clarity of the image will first increase and then decrease. The horizontal axis ranges from 0 to 10, and the vertical axis ranges from 0 to 3.
[0135] In a first embodiment, to enable the image acquisition device to focus, the user can trigger the autofocus trigger control. Furthermore, the electronic device can control the image acquisition device's motor to rotate according to a preset motor step value. During motor rotation, the clarity of the character image can be continuously evaluated. When the character image's clarity is highest, the motor can be stopped, at which point the image acquisition device completes focusing on the area to be recognized. The preset motor step value can be 220, 240, 260, and so on, and is not specifically limited herein.
[0136] For example, Figure 3 As shown, the user can click the auto focus trigger control 303. At this time, the interface can be displayed as follows Figure 7 The tuning icon 701 shown has a specific prompt word "tuning", which is used to prompt the user that the image acquisition device is currently being focused. Specifically, the electronic device can control the motor of the image acquisition device to rotate according to the preset motor step value to focus on the area to be recognized. Figure 7 and Figure 3 The only difference between them is the tuning icon 701, so no more Figure 7 The rest of the description is given in detail.
[0137] In a second embodiment, the user can set the motor step value in the motor step value setting area. The electronic device can then control the motor of the image acquisition device to rotate according to the motor step value set by the user. During motor rotation, the clarity of the character image can be continuously assessed. When the character image is at its clearest, the motor can be stopped, at which point the image acquisition device can achieve focus on the area to be recognized.
[0138] The motor step value may be set by directly inputting the motor step value, or by clicking an increase button or a decrease button corresponding to the motor step value to increase or decrease the motor step value, both of which are reasonable.
[0139] For example, Figure 3 As shown, the user can set the motor step value in the motor step value setting area 304. At this time, the interface can also be displayed as follows: Figure 7 As shown in the tuning icon 701 , the electronic device can control the motor of the image acquisition device to rotate according to the motor step value set by the user to focus on the area to be identified.
[0140] It can be seen that in the embodiment of the present application, in response to the trigger operation issued by the user for the automatic focus trigger control, the electronic device controls the motor of the image acquisition device to rotate according to the preset motor step value to focus on the area to be identified; or, in response to the motor step value set by the user in the motor step value setting area, the motor of the image acquisition device is controlled to rotate according to the motor step value set by the user to focus on the area to be identified. Through the first embodiment, the user's operation can be simplified and the effect of autofocus can be achieved. Through the second embodiment, the user can set the motor step value, which can improve the fineness of the focus and avoid the non-identification area outside the area to be identified from interfering with the clarity assessment, so that the character image captured by the image acquisition device is clearer.
[0141] As an implementation of the embodiment of the present application, the above client interface may display an initial value setting area and a polling trigger control. In this case, Figure 8 As shown, in the above-mentioned step of acquiring the character image captured by the image capture device in response to the user's selection operation on the light source identifier displayed on the client interface, when the light source parameters of the target light source are different parameter value combinations, the step may include:
[0142] S801, obtaining the initial value of the light source parameter input by the user based on the initial value setting area;
[0143] In order to set the parameter value of each light source parameter, the user can enter the initial value of the light source parameter based on the initial value setting area displayed on the client interface. In one embodiment, the user can directly enter the initial value of the light source parameter in the initial value setting area. In another embodiment, the user can increase or decrease the initial value of the light source parameter by clicking the increase button or decrease button corresponding to the light source parameter. Before focusing the image acquisition device, in order to ensure uniform brightness, the initial value of the light source parameter can be pre-adjusted to prevent the area to be identified and the edges from being overexposed or too dark.
[0144] The value of light source brightness is usually 0 to 255. The default initial value of light source brightness can be the product of the maximum light source brightness and the preset light source brightness ratio. For example, the preset light source brightness ratio can be 80%. The initial values of exposure time, gain and gamma are usually small.
[0145] For example, Figure 3 As shown, the user can click the equilateral triangle in the initial value setting area 305 to increase the initial value of the light source parameter, and can also click the inverted triangle in the initial value setting area 305 to decrease the initial value of the light source parameter.
[0146] The above step of setting the initial value of the light source parameter can be performed separately from the step of focusing the image acquisition device, or can be performed simultaneously, which is reasonable.
[0147] S802, in response to a selection operation issued by the user on a light source identifier displayed on the client interface, determining a target light source corresponding to the light source identifier indicated by the selection operation;
[0148] When the user issues a selection operation on the light source identifier displayed on the client interface, the electronic device can determine the target light source corresponding to the light source identifier indicated by the selection operation.
[0149] S803, in response to the trigger operation issued by the user for the polling trigger control, for the target light source, within the preset parameter value range, according to the preset step size, based on the initial value, adjust the light source parameters of the target light source to obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations.
[0150] After setting the initial value and the target light source, the user can trigger the polling trigger control displayed on the client interface. In this way, the electronic device can adjust the light source parameters of the target light source within the preset parameter value range, according to the preset step size, based on the initial value set by the user, and obtain the character images captured by the image acquisition device when the light source parameters of the target light source have different parameter value combinations. The polling trigger control can specifically be a polling button.
[0151] For example, the fourth schematic diagram of the client interface can be as follows Figure 9 As shown, the user can click the polling button 901. Since the currently selected recipe is recipe 4, the target light sources corresponding to recipe 4 are light source 2, light source 3, light source 6, light source 7, light source 14, and light source 15. Therefore, the electronic device can adjust the light source parameters of the target light sources within the preset parameter value range, according to the preset step size, based on the initial value, to obtain character images captured by the image capture device when the light source parameters of the target light sources are different parameter value combinations. Figure 9 Above the character image, the debug mode is displayed.
[0152] The preset parameter value range and the preset step size may be determined based on the initial value. Specifically, the upper limit of the preset parameter value range may be the product of the initial value and a first preset ratio, the lower limit of the preset parameter value range may be the product of the initial value and a second preset ratio, and the preset step size may be the product of the initial value and a third preset ratio.
[0153] For example, the first preset ratio, the second preset ratio, and the third preset ratio may be 50%, 150%, and 10%, respectively. Assuming that the initial value of the exposure parameter is 3000, the preset parameter value range corresponding to the exposure parameter is 1500 to 4500, and the preset step size is 300. In this case, the values of the exposure parameter are 1500, 1800, ..., 4500, in sequence.
[0154] In one embodiment, in order to achieve one-touch tuning of the image acquisition device, in response to the trigger operation issued by the user for the polling trigger control, the electronic device can set the initial value of the light source parameter, and generate a preset parameter value range and a preset step size based on the initial value, without the user having to input the initial value of the light source parameter. Next, the electronic device can control the image acquisition device to focus on the area to be recognized. When the focus is completed, the light source parameters of the target light source can be adjusted based on the initial value within the preset parameter value range and according to the preset step size for the target light source, so as to obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations.
[0155] It can be seen that in the embodiment of the present application, the electronic device can obtain the initial value of the light source parameter input by the user based on the initial value setting area; in response to the selection operation issued by the user for the light source identifier displayed on the client interface, determine the target light source corresponding to the light source identifier indicated by the selection operation; in response to the trigger operation issued by the user for the polling trigger control, for the target light source, within the preset parameter value range, according to the preset step size, based on the initial value, adjust the light source parameters of the target light source to obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations. In this way, the user can set the initial value of the light source parameter through the client interface and select the target light source. Furthermore, when the user issues a trigger operation on the polling trigger control, the electronic device can obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations. In this way, there is no need for the user to manually adjust the parameter value of the light source parameter, which can simplify the user's operation.
[0156] As an implementation of an embodiment of the present application, the client interface may display an image recognition result display area and an evaluation index setting area. In this case, before the step of performing character recognition on the character image to obtain the image recognition result, the method may further include:
[0157] Obtaining the evaluation index threshold and the character true value input by the user based on the evaluation index setting area;
[0158] To evaluate the quality of character images, users can set an area based on the evaluation index, enter the evaluation index threshold and the character true value, which is the actual character content of the character to be recognized.
[0159] When the evaluation index result is a confidence level, the evaluation index threshold may be a threshold corresponding to the confidence level, specifically 0.90, 0.95, 0.98, and so on, without specific limitation herein. When the evaluation index result is a character score calculated using the confidence level, the evaluation index threshold may be a score threshold corresponding to the character score. For example, the character score may be the product of the confidence level and 100, and the score threshold may be 90, 95, 98, and so on, without specific limitation herein.
[0160] For example, Figure 9 As shown, the user can set the evaluation index threshold and the character truth value based on the evaluation index setting area 902. The evaluation index setting area 902 displays the input score threshold 99 and the character truth value FA711708-09A6. The area title of the evaluation index setting area 902 is recognition result.
[0161] Correspondingly, such as Figure 10As shown, the steps of performing character recognition on the character image to obtain an image recognition result, and determining the optimal parameter value combination from the parameter value combinations based on the image recognition result may include:
[0162] S1001, performing character recognition on the character image to obtain character information and evaluation index results;
[0163] To determine whether a character to be recognized in a character image is clear, the electronic device may perform character recognition on the character image to obtain character information and an evaluation index result. The character information may be the specific character content of the character to be recognized obtained through character recognition, and the evaluation index result may be a confidence level or a character score obtained by converting the confidence level.
[0164] S1002, determining a parameter value combination whose corresponding character information is the same as the character true value and whose corresponding evaluation index result is greater than the evaluation index threshold as a candidate parameter value combination;
[0165] If, when the light source parameter values are a certain combination of parameter values, the character information in the character image is identical to the true character value, and the corresponding evaluation index result is greater than the evaluation index threshold, this parameter value combination indicates that the image acquisition device can capture an accurate character image and that the character information corresponds to a high degree of accuracy. Therefore, the parameter value combination for which the corresponding character information is identical to the true character value and the corresponding evaluation index result is greater than the evaluation index threshold can be determined as a candidate parameter value combination.
[0166] S1003, determining an optimal parameter value combination from the candidate parameter value combinations based on evaluation index results corresponding to the candidate parameter value combinations;
[0167] Since the evaluation index result can represent the accuracy of the corresponding character information, the electronic device can determine the best parameter value combination from the candidate parameter value combinations based on the evaluation index results corresponding to the candidate parameter value combinations. In one embodiment, the electronic device can use the candidate parameter value combination with the largest corresponding evaluation index result as the best parameter value combination.
[0168] S1004: Display the character information, the evaluation index results, and the optimal light source identifier in the image recognition result display area.
[0169] To display the image recognition results, the electronic device may display character information, evaluation index results, and the optimal light source identifier in the image recognition result display area. The optimal light source identifier may be the light source identifier corresponding to the light source to which the optimal parameter value combination belongs.
[0170] Continue as Figure 9As shown, the evaluation index setting area 902 includes the image recognition result display area, which displays text information, evaluation index results, optimal light source identifier, and optimal exposure time. The text information is A711708-09A6, the evaluation index result is 99.983, the optimal light sources are light source 2 and light source 3, and the optimal exposure time is 1350μs.
[0171] In addition, the evaluation index setting area 902 can also display the total number of acquisitions 18, the number of successful positioning 18, and the number of successful recognition 18, indicating that there are a total of 18 parameter value combinations, and the characters to be recognized in the character image corresponding to each parameter value combination are successfully positioned and recognized. The polling setting area 903 can display the selection box corresponding to the local or online and the timeout time. The currently selected operating state is the local machine, and the timeout time can be used for the polling process of the best parameter value combination. Specifically, when the polling duration exceeds the above timeout time, the polling is terminated, and the best parameter value combination is determined from the candidate parameter value combinations that have been obtained. The specific value of the timeout time can be pre-set, Figure 9 The timeout in is 120000ms. Figure 9 As shown, the title of the polling setting area 903 is Polling. On the right side of the area options corresponding to debugging, area options corresponding to simulation and area options corresponding to file transfer protocol are also displayed.
[0172] It can be seen that in the embodiment of the present application, if the parameter value of the light source parameter is a certain parameter value combination, the character information in the character image is the same as the true value of the character, and the corresponding evaluation index result is greater than the evaluation index threshold, it means that the parameter value combination can enable the image acquisition device to capture an accurate character image, and the accuracy of the character information is relatively high. Then, the parameter value combination in which the corresponding character information is the same as the true value of the character and the corresponding evaluation index result is greater than the evaluation index threshold can be determined as a candidate parameter value combination, and then the optimal parameter value combination is determined from the candidate parameter value combination based on the evaluation index result. In this way, the optimal parameter value combination can be determined quickly and accurately. Moreover, by establishing an evaluation method for character recognition imaging quality, the open-loop system of imaging quality and character recognition results can be converted into a closed-loop system, and the accuracy and confidence of the character information can be used as evaluation indicators to achieve the derivation of the optimal parameter value combination by back propagation.
[0173] As an implementation of an embodiment of the present application, the client interface may display a parameter write trigger control. In this case, the method may further include:
[0174] In response to a trigger operation issued by the user on the parameter write trigger control, the parameter value of the optimal light source is set as the optimal parameter value combination.
[0175] After determining the optimal parameter value combination, the user can trigger the parameter write trigger control displayed on the client interface. In this way, the electronic device can set the parameter values of the optimal light source to the optimal parameter value combination. The optimal light source can be the light source belonging to the optimal parameter value group.
[0176] For example, assuming that the best light sources are light source 2 and light source 3, and the exposure time in the best parameter value combination is 1350μs, then when the user issues a trigger operation for the parameter write trigger control, the electronic device can set the exposure time of light source 2 and light source 3 to 1350μs.
[0177] like Figure 9 As shown, the parameter writing trigger control can be a write camera button 904. The client interface also displays a save recipe button 905. When the user clicks the save recipe button 905, the electronic device can write the best parameter value combination and the best light source information into the local configuration file for storage. Figure 9 In addition to the description, Figure 9 The rest of Figure 7 Same, so no longer Figure 9 The rest of the description is given in detail.
[0178] As can be seen, in the embodiments of the present application, in response to a user triggering a parameter write trigger control, the electronic device can set the parameter values of the optimal light source to the optimal parameter value combination, where the optimal light source is the light source belonging to the optimal parameter value group. In this way, after determining the optimal parameter value combination, the optimal light source can be configured with one click, further reducing user operations.
[0179] As an implementation manner of an embodiment of the present application, the above-mentioned step of adjusting the light source parameters of the target light source based on the initial value within a preset parameter value range and according to a preset step size to obtain a character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations may include:
[0180] For each light source to be adjusted, for each light source parameter, keep the parameter values of the other light source parameters unchanged, adjust the light source parameter of the light source to be adjusted according to the preset parameter value range and preset step size corresponding to the light source parameter, and obtain the character image captured by the image acquisition device each time the light source parameter is adjusted.
[0181] To obtain a character image captured by an image capture device when the light source parameters are combinations of various parameter values, the electronic device may adjust each light source parameter to be adjusted according to a preset parameter value range and a preset step size corresponding to the light source parameter while maintaining the parameter values of the remaining light source parameters unchanged. Each time the light source parameter is adjusted, the electronic device may obtain a character image captured by the image capture device. The light source parameters may include exposure time, gain, gamma, and light source brightness, wherein the light source brightness generally does not change after being set.
[0182] When the number of target light sources is 1, the light source to be adjusted can be the target light source. When the number of target light sources is multiple, in order to determine the effects of multiple target light sources when they are turned on individually and in combination, the light source to be adjusted can be each target light source and a target light source combination. The target light source combination can be composed of multiple light sources in the target light source, that is, each light source in the target light source is arranged and combined. For example, if the target light source is light source 1-light source 3, then the target light source combination can be light source 1 and light source 2, light source 1 and light source 3, light source 2 and light source 3, or light source 1, light source 2 and light source 3.
[0183] In one embodiment, the target light source combination may be only two adjacent light sources with corresponding light source identifiers among multiple target light sources. For example, assuming that the target light sources include light source 3, light source 4, light source 5, light source 8, and light source 9, then the target light source combination may be light source 3 and light source 4, light source 4 and light source 5, and light source 8 and light source 9.
[0184] In the case where the light source to be adjusted is a target light source combination, adjusting the light source parameter of the light source to be adjusted means adjusting the light source parameter of each light source in the target light source combination to the same parameter value.
[0185] The following examples illustrate the process of obtaining character images when there is one target light source and when there are multiple target light sources:
[0186] For example, assuming that the target light source is light source 5, and the light source parameters that need to be automatically optimized are gain and exposure time, then only light source 5 can be turned on, and the gain can be traversed first. At this time, the parameter value of the exposure time needs to be controlled unchanged, and the gain of light source 5 is adjusted according to the preset parameter value range and preset step size corresponding to the gain. Each time the gain is adjusted, the character image captured by the image acquisition device is obtained. Specifically:
[0187] In the first round, the parameter value of the gain can be set to the lower limit of the preset parameter value range corresponding to the gain, and the parameter value of the exposure time can be set to the lower limit of the preset parameter value range corresponding to the exposure time. The character image captured by the image acquisition device is obtained, and character recognition is performed on the character image to obtain character information and a confidence score. Then, the parameter value of the exposure time is always kept unchanged in this round. In this case, the parameter value of the gain is updated to the sum of the current parameter value of the gain and the preset step size corresponding to the gain. The character image captured by the image acquisition device is then obtained, and character recognition is performed on the character image to obtain character information and a confidence score. This cycle continues, and according to the preset step size, the parameter values in the preset parameter value range corresponding to the gain are traversed in sequence until the parameter value of the gain reaches the upper limit of the preset parameter value range corresponding to the gain.
[0188] In the second round, the parameter value of the gain can be set to the lower limit of the preset parameter value range corresponding to the gain, and the parameter value of the exposure time can be set to the sum of the lower limit of the preset parameter value range corresponding to the exposure time and the preset step length corresponding to the exposure time. The character image captured by the image acquisition device is obtained, and character recognition is performed on the character image to obtain character information and a confidence score. Then, the parameter value of the exposure time is always kept unchanged in this round. In this case, the parameter value of the gain is updated to the sum of the current parameter value of the gain and the preset step length corresponding to the gain. The character image captured by the image acquisition device is obtained, and character recognition is performed on the character image to obtain character information and a confidence score. This cycle continues, and the parameter values in the preset parameter value range corresponding to the gain are traversed in sequence according to the preset step length until the parameter value of the gain reaches the upper limit of the preset parameter value range corresponding to the gain.
[0189] In the third round, the parameter value of the gain can be set to the lower limit of the preset parameter value range corresponding to the gain, and the parameter value of the exposure time can be set to the sum of the lower limit of the preset parameter value range corresponding to the exposure time and the preset step length corresponding to twice the exposure time. The character image captured by the image acquisition device is obtained, and the character image is subjected to character recognition to obtain character information and a confidence score. Then, the parameter value of the exposure time is kept unchanged throughout this round. In this case, the parameter value of the gain is updated to the sum of the current parameter value of the gain and the preset step length corresponding to the gain. The character image captured by the image acquisition device is obtained, and the character image is subjected to character recognition to obtain character information and a confidence score. This cycle continues, and the parameter values in the preset parameter value range corresponding to the gain are traversed in sequence according to the preset step length until the parameter value of the gain reaches the upper limit of the preset parameter value range corresponding to the gain.
[0190] This process is repeated several times in this way until the gain parameter value reaches the upper limit of the preset parameter value range corresponding to the gain, and the exposure time parameter value reaches the upper limit of the preset parameter value range corresponding to the exposure time, completing the traversal of the parameter value combinations for light source 5. That is, in the above process, within each round, the parameter value controlling the exposure time remains unchanged, and the gain parameter value is traversed. Each time the gain parameter value is adjusted, a character image captured by the image acquisition device is obtained, and character recognition is performed on the character image to obtain character information and a confidence score. Between each round, the parameter value controlling the exposure parameter is sequentially changed according to the preset step size. In this way, the exposure time and gain parameter values can take on various parameter value combinations.
[0191] The program structure corresponding to the above process can be shown as follows:
[0192]
[0193] Where int i represents the current number of exposure time adjustments, and int j represents the current number of gain adjustments. The exposure time adjustment threshold can be determined based on a preset parameter value range corresponding to the exposure time and a preset step size corresponding to the exposure time. The gain adjustment threshold can be determined based on a preset parameter value range corresponding to the gain and a preset step size corresponding to the gain.
[0194] For another example, assuming the target light sources are light source 3 and light source 4, and the light source parameters that need to be automatically optimized are gain and exposure time, then the above process can be performed on light source 3 first. After the execution is completed, light source 3 is turned off, light source 4 is turned on, and the above process is performed again on light source 4. Next, light sources 3 and 4 can be turned on at the same time and the above process can be performed on both light sources 3 and 4.
[0195] It can be seen that in the embodiment of the present application, the electronic device can keep the parameter values of the other light source parameters unchanged for each light source to be adjusted, and adjust the light source parameter of the light source to be adjusted according to the preset parameter value range and preset step size corresponding to the light source parameter. Each time the light source parameter is adjusted, a character image captured by the image acquisition device is obtained, wherein, when the number of target light sources is 1, the light source to be adjusted is the target light source, and when the number of target light sources is multiple, the light source to be adjusted is each target light source and a target light source combination, and the target light source combination is composed of multiple light sources in the target light sources. In this way, the parameter values of the light source parameters can be debugged by the electronic device, and there is no need to debug the light source parameters manually, which can reduce the difficulty of debugging.
[0196] As an implementation method of the present application, Figure 11As shown, for each light source to be adjusted, for each light source parameter, keeping the parameter values of the other light source parameters unchanged, adjusting the light source parameter of the light source to be adjusted according to the preset parameter value range and preset step size corresponding to the light source parameter, and each time adjusting the light source parameter, obtaining the character image captured by the image acquisition device, may include:
[0197] S1101: for each light source to be adjusted, for each light source parameter, keep the parameter values of other light source parameters unchanged, and adjust the light source parameter of the light source to be adjusted to the currently traversed parameter value;
[0198] In the process of traversing the parameter values of a certain light source parameter, in order to individually determine the impact of the light source parameter on the clarity of the characters to be recognized in the character image, the electronic device can, for each light source to be adjusted, keep the parameter values of the remaining light source parameters unchanged, and adjust the light source parameter of the light source to be adjusted to the currently traversed parameter value.
[0199] In the case of the first traversal, the parameter value of the light source parameter currently traversed is the lower limit of the preset parameter value range corresponding to the light source parameter. For example, assuming the preset parameter value range corresponding to the exposure parameter is 1500 to 4500, then in the case of the first traversal, the parameter value of the exposure parameter currently traversed is 1500.
[0200] S1102, acquiring a character image captured by the image capture device;
[0201] After each adjustment of the parameter value, the electronic device can obtain the character image captured by the image capture device.
[0202] S1103, update the currently traversed parameter value to the sum of the currently traversed parameter value of the light source parameter and the preset step size corresponding to the light source parameter, and return to step S1101 until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter.
[0203] Next, the electronic device can update the parameter value currently traversed by the light source parameter to the sum of the currently traversed parameter value and the preset step length corresponding to the light source parameter, thereby traversing the next parameter value in a step-by-step manner until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter.
[0204] For example, assuming the preset parameter value range for the exposure parameter is 1500 to 4500, with a preset step size of 300, and the currently traversed parameter value of the exposure parameter is 1500, then the currently traversed parameter value can be updated to the sum of 1500 and 300, that is, 1800, and the process returns to the step of adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value. In other words, the exposure parameter of the light source to be adjusted is set to 1800, and the character image captured by the image acquisition device is obtained. The above process is repeated until the currently traversed parameter value is greater than 4500.
[0205] It can be seen that in the embodiment of the present application, the electronic device can, for each light source to be adjusted, for each light source parameter, keep the parameter values of the other light source parameters unchanged, and adjust the light source parameter of the light source to be adjusted to the currently traversed parameter value, wherein, in the case of the first traversal, the currently traversed parameter value of the light source parameter is the lower limit of the preset parameter value range corresponding to the light source parameter; obtain the character image captured by the image acquisition device; update the currently traversed parameter value to be the sum of the currently traversed parameter value of the light source parameter and the preset step length corresponding to the light source parameter, and return to the step of adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value, until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter. In this way, the parameter value of the light source parameter can be debugged by the electronic device, and the light source parameter does not need to be debugged manually, which can reduce the difficulty of debugging.
[0206] As an implementation method of the embodiment of the present application, a flow chart for determining the optimal parameter value combination can be as follows: Figure 12 As shown, the following steps may be specifically included:
[0207] S1201, focusing on the area to be identified;
[0208] In order to enable the image acquisition device to clearly capture the characters to be recognized, the image acquisition device may be controlled to focus on the area to be recognized.
[0209] S1202, setting the initial values of light source parameters;
[0210] Next, the user can set the initial values of the light source parameters through the client interface.
[0211] S1203, automatic optimization of parameter value combinations;
[0212] After the initial value is set, the electronic device can automatically optimize the parameter value combination, that is, automatically find the parameter value combination that makes the system perform best according to a preset algorithm or program.
[0213] S1204: Determine the optimal parameter value combination.
[0214] Through automatic optimization, the electronic device can determine the best combination of parameter values.
[0215] As an implementation method of the embodiment of the present application, a flow chart for determining the optimal parameter value combination by polling can be as follows: Figure 13 As shown, the following steps may be specifically included:
[0216] S1301, selecting at least one group of light sources as target light sources;
[0217] The user can select at least one group of light sources from the light source identifiers displayed on the client interface, and the electronic device can use the light sources selected by the user as target light sources.
[0218] S1302, setting character true value and evaluation index threshold;
[0219] Users can set the true value of the character to be recognized and the evaluation index threshold on the client interface.
[0220] S1303, turning on the first group of light sources in the target light sources;
[0221] Next, the electronic device may turn on a first group of light sources in the target light source, and control the remaining light sources in the target light source to turn off.
[0222] S1304, generating a preset parameter value range and a preset step size corresponding to the light source parameters;
[0223] The electronic device can generate a preset parameter value range and a preset step size corresponding to the light source parameter based on the initial value of the light source parameter. In this embodiment, the light source parameters include light source parameter 1 and light source parameter 2 as an example for description.
[0224] S1305, fixing the parameter value of light source parameter 2, adjusting the parameter value of light source parameter 1, and determining the character information in the character image and the corresponding evaluation index result;
[0225] The electronic device may fix the parameter value of light source parameter 2 and adjust the parameter value of light source parameter 1 according to the preset parameter value range and preset step size corresponding to light source parameter 1. Each time the parameter value is adjusted, the electronic device may obtain a character image captured by the image acquisition device and determine the character information in the character image and the corresponding evaluation index result.
[0226] S1306, determining whether the character information and the evaluation index results meet the filtering rules; if yes, executing step S1307; if no, executing step S1308;
[0227] The electronic device can determine whether the character information and the evaluation index result meet the filtering rules. Specifically, it can determine whether the character information is the same as the character true value and whether the evaluation index result is greater than the evaluation index threshold. If the character information is the same as the character true value and the evaluation index result is greater than the evaluation index threshold, then it can be determined that the parameter value combination meets the filtering rules. If the character information is different from the character true value, or the evaluation index result is not greater than the evaluation index threshold, then it can be determined that the parameter value combination does not meet the filtering rules.
[0228] S1307, determining the parameter value combination as a candidate parameter value combination;
[0229] In the case that the parameter value combination meets the filtering rule, the parameter value combination may be determined as a candidate parameter value combination, and step S1308 is continued.
[0230] S1308, determining whether the light source parameter 1 reaches the upper limit of the preset parameter value range; if yes, executing step S1309; if no, returning to step S1305;
[0231] The electronic device can determine whether light source parameter 1 reaches the upper limit of the preset parameter value range corresponding to light source parameter 1. If the upper limit is reached, it means that the parameter value of light source parameter 1 has been traversed, and the electronic device can continue to traverse the parameter value of the next light source parameter. If the upper limit is not reached, it means that the parameter value of light source parameter 1 has not been traversed, and the electronic device can return to the step of adjusting the parameter value of light source parameter 1.
[0232] S1309, fixing the parameter value of light source parameter 1, adjusting the parameter value of light source parameter 2, and determining the character information in the character image and the corresponding evaluation index result;
[0233] After the parameter value traversal of light source parameter 1 is completed, the electronic device can fix the parameter value of light source parameter 1 and adjust the parameter value of light source parameter 2 according to the preset parameter value range and preset step size corresponding to light source parameter 2. Each time the parameter value is adjusted, the electronic device can obtain a character image captured by the image acquisition device and determine the character information in the character image and the corresponding evaluation index result.
[0234] S1310, determining whether the character information and the evaluation index results meet the filtering rules; if yes, executing step S1311; if not, executing step S1312;
[0235] The electronic device can determine whether the character information and the evaluation index result meet the filtering rules. Specifically, it can determine whether the character information is the same as the character true value and whether the evaluation index result is greater than the evaluation index threshold. If the character information is the same as the character true value and the evaluation index result is greater than the evaluation index threshold, then it can be determined that the parameter value combination meets the filtering rules. If the character information is different from the character true value, or the evaluation index result is not greater than the evaluation index threshold, then it can be determined that the parameter value combination does not meet the filtering rules.
[0236] S1311, determining the parameter value combination as a candidate parameter value combination;
[0237] In the case that the parameter value combination meets the filtering rule, the parameter value combination can be determined as a candidate parameter value combination, and step S1312 is continued.
[0238] S1312, determining whether light source parameter 2 reaches the upper limit of the preset parameter value range; if yes, executing step S1313; if no, returning to step S1309;
[0239] The electronic device can determine whether light source parameter 2 reaches the upper limit of the preset parameter value range corresponding to light source parameter 2. If the upper limit is reached, it means that the parameter value of light source parameter 1 has been traversed. If the upper limit is not reached, it means that the parameter value of light source parameter 1 has not been traversed, and the electronic device can return to the step of adjusting the parameter value of light source parameter 2.
[0240] S1313, polling parameter value combinations corresponding to other light sources to be adjusted;
[0241] When polling is completed for the first group of light sources in the target light sources, the electronic device may continue to poll parameter value combinations corresponding to other light sources to be adjusted.
[0242] S1314, determining whether the polling of parameter value combinations corresponding to all light sources to be adjusted is completed; if so, executing step S1315; if not, returning to step S1313;
[0243] The electronic device may determine whether the polling of parameter value combinations corresponding to all light sources to be adjusted is complete. If so, the optimal parameter value combination may be determined from the determined candidate parameter value combinations. If not, the polling of parameter value combinations corresponding to other light sources to be adjusted may continue.
[0244] S1315, determining the candidate parameter value combination with the highest corresponding evaluation index result as the optimal parameter value combination;
[0245] The electronic device may determine the candidate parameter value combination with the highest corresponding evaluation index result as the optimal parameter value combination.
[0246] S1316, writing the optimal parameter value combination into the configuration file or the optimal light source.
[0247] Finally, the electronic device may write the optimal parameter value combination into a configuration file or an optimal light source, thereby storing the optimal parameter value combination.
[0248] In the technical solution of this application, the operations involved in obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.
[0249] Corresponding to the above method for determining light source parameters, an embodiment of the present application further provides a device for determining light source parameters. The following describes a device for determining light source parameters provided in an embodiment of the present application.
[0250] like Figure 14 As shown, a device for determining light source parameters, the device comprising:
[0251] The region setting module 1401 is configured to determine, in response to a region setting operation issued by a user for a character image displayed on a client interface, a region to be recognized set by the user for a character region in the character image, wherein the character image is acquired by an image acquisition device for the character to be recognized;
[0252] An image acquisition module 1402 is configured to, when the image acquisition device has focused on the to-be-recognized area, acquire, in response to a user's selection operation on a light source identifier displayed on the client interface, a character image captured by the image acquisition device when light source parameters of a target light source have different combinations of parameter values, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation;
[0253] The combination determination module 1403 is configured to perform character recognition on the character image to obtain an image recognition result, and determine an optimal parameter value combination from the parameter value combinations based on the image recognition result.
[0254] It can be seen that in the solution provided by the embodiment of the present application, in response to the user issuing an area setting operation for the character image displayed on the client interface, the electronic device can determine the area to be recognized set by the user for the character area in the character image, wherein the character image is obtained by capturing the character to be recognized through the image acquisition device; when the image acquisition device completes focusing on the area to be recognized, in response to the user issuing a selection operation for the light source identifier displayed on the client interface, the character image captured by the image acquisition device is obtained when the light source parameters of the target light source are different parameter value combinations, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation; character recognition is performed on the character image to obtain an image recognition result, and based on the image recognition result, the optimal parameter value combination is determined from the parameter value combination. Since the clarity of the character to be recognized is affected by the light source turned on and the specific light source parameters when the character image is captured by the image acquisition device, the character image captured by the image acquisition device can be obtained when the light source parameters of the target light source selected by the user are different parameter value combinations. Furthermore, character recognition can be performed on the character image to obtain an image recognition result. For example, the image recognition result can include character information and confidence of the character to be recognized. Since the image recognition result and the light source parameters of the target light source are a certain parameter value combination, the resolvability of the characters to be recognized in the character image is related. The clarity of the characters to be recognized and the resolvability are positively correlated within a certain range, but the two are not equivalent. Therefore, the image recognition result is used as an evaluation indicator of the resolvability of the characters to be recognized, thereby converting the open-loop system between the image recognition result and the resolvability of the characters to be recognized into a closed-loop system, and the image recognition result is used as feedback excitation for the closed-loop system. The image recognition result, rather than the clarity of the characters to be recognized, is used to determine the optimal parameter value combination from the parameter value combination. In this way, the optimal parameter value combination can be determined by electronic equipment, and there is no need to manually debug the light source parameters or manually evaluate the resolvability of the characters to be recognized. Therefore, the debugging cycle for the light source parameters can be shortened, the debugging difficulty can be reduced, and the reliability of the parameter values can be improved.
[0255] As an implementation of an embodiment of the present application, the client interface may display a character image and a region setting trigger control. In this case, the region setting module 1401 may include:
[0256] An icon display submodule, configured to respond to a trigger operation issued by a user for setting a trigger control for the area, and following the user issuing a drawing operation for the character image, display an icon of the image area indicated by the drawing operation;
[0257] The area setting submodule is configured to, in response to a confirmation operation issued by the user, use the image area indicated by the drawing operation as an area to be identified.
[0258] As an implementation of an embodiment of the present application, the client interface may display an automatic focus trigger control, and / or the client interface may display a motor step value setting area. In this case, the device may further include:
[0259] a first focusing module, configured to control the motor of the image acquisition device to rotate according to a preset motor step value in response to a trigger operation issued by the user on the automatic focus trigger control, so as to focus on the area to be identified;
[0260] The second focusing module is used to respond to the motor step value set by the user in the motor step value setting area, and control the motor of the image acquisition device to rotate according to the motor step value set by the user to focus on the area to be identified.
[0261] As an implementation of an embodiment of the present application, the client interface may display an initial value setting area and a polling trigger control. In this case, the image acquisition module 1402 may include:
[0262] An initial value acquisition submodule, configured to acquire the initial value of the light source parameter input by the user based on the initial value setting area;
[0263] a target light source determination submodule, configured to, in response to a selection operation issued by the user with respect to the light source identifier displayed on the client interface, determine a target light source corresponding to the light source identifier indicated by the selection operation;
[0264] The image acquisition submodule is used to respond to the trigger operation issued by the user for the polling trigger control, and adjust the light source parameters of the target light source based on the initial value within the preset parameter value range and according to the preset step size, so as to obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations.
[0265] As an implementation of an embodiment of the present application, the client interface may display an image recognition result display area and an evaluation index setting area. In this case, the apparatus may further include:
[0266] An indicator acquisition module, configured to acquire the evaluation indicator threshold and the character true value input by the user based on the evaluation indicator setting area;
[0267] Accordingly, the combination determination module 1403 may include:
[0268] A character recognition submodule, configured to perform character recognition on the character image to obtain character information and evaluation index results;
[0269] a candidate combination determination submodule, configured to determine, as a candidate parameter value combination, a parameter value combination whose corresponding character information is the same as the character true value and whose corresponding evaluation index result is greater than the evaluation index threshold;
[0270] An optimal combination determination submodule, configured to determine an optimal parameter value combination from the candidate parameter value combinations based on evaluation index results corresponding to the candidate parameter value combinations;
[0271] The result display submodule is used to display the character information, the evaluation index results and the optimal light source identification in the image recognition result display area, wherein the optimal light source identification is the light source identification corresponding to the light source to which the optimal parameter value combination belongs.
[0272] As an implementation of an embodiment of the present application, the client interface may display a parameter write trigger control. In this case, the apparatus may further include:
[0273] The parameter value writing module is used to set the parameter value of the optimal light source to the optimal parameter value combination in response to the trigger operation issued by the user on the parameter writing trigger control, wherein the optimal light source is the light source belonging to the optimal parameter value group.
[0274] As an implementation of an embodiment of the present application, the above-mentioned image acquisition submodule may include:
[0275] An image acquisition unit is configured to, for each light source to be adjusted, keep the parameter values of the other light source parameters unchanged, adjust the light source parameter of the light source to be adjusted according to a preset parameter value range and a preset step size corresponding to the light source parameter, and acquire a character image captured by the image acquisition device each time the light source parameter is adjusted, wherein, when the number of the target light sources is one, the light source to be adjusted is the target light source; when the number of the target light sources is multiple, the light source to be adjusted is each target light source and a target light source combination, and the target light source combination is composed of multiple light sources among the target light sources.
[0276] As an implementation of the embodiment of the present application, the image acquisition unit may include:
[0277] a parameter value adjustment subunit, for each light source parameter to be adjusted, keeping the parameter values of the other light source parameters unchanged, and adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value, wherein, in the case of the first traversal, the currently traversed parameter value of the light source parameter is the lower limit of the preset parameter value range corresponding to the light source parameter;
[0278] An image acquisition subunit, configured to acquire the character image acquired by the image acquisition device;
[0279] The parameter value updating subunit is used to update the currently traversed parameter value to the sum of the currently traversed parameter value of the light source parameter and the preset step size corresponding to the light source parameter, and return to the step of adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter.
[0280] The present application also provides an electronic device, such as Figure 15 As shown, including:
[0281] Memory 1501, used for storing computer programs;
[0282] The processor 1502 is configured to implement the method for determining light source parameters described in any of the above embodiments when executing the program stored in the memory 1501 .
[0283] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 1502, the communication interface, and the memory 1501 communicate with each other via the communication bus.
[0284] It can be seen that in the solution provided by the embodiment of the present application, in response to the user issuing an area setting operation for the character image displayed on the client interface, the electronic device can determine the area to be recognized set by the user for the character area in the character image, wherein the character image is obtained by capturing the character to be recognized through the image acquisition device; when the image acquisition device completes focusing on the area to be recognized, in response to the user issuing a selection operation for the light source identifier displayed on the client interface, the character image captured by the image acquisition device is obtained when the light source parameters of the target light source are different parameter value combinations, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation; character recognition is performed on the character image to obtain an image recognition result, and based on the image recognition result, the optimal parameter value combination is determined from the parameter value combination. Since the clarity of the character to be recognized is affected by the light source turned on and the specific light source parameters when the character image is captured by the image acquisition device, the character image captured by the image acquisition device can be obtained when the light source parameters of the target light source selected by the user are different parameter value combinations. Furthermore, character recognition can be performed on the character image to obtain an image recognition result. For example, the image recognition result can include character information and confidence of the character to be recognized. Since the image recognition result and the light source parameters of the target light source are a certain parameter value combination, the resolvability of the characters to be recognized in the character image is related. The clarity of the characters to be recognized and the resolvability are positively correlated within a certain range, but the two are not equivalent. Therefore, the image recognition result is used as an evaluation indicator of the resolvability of the characters to be recognized, thereby converting the open-loop system between the image recognition result and the resolvability of the characters to be recognized into a closed-loop system, and the image recognition result is used as feedback excitation for the closed-loop system. The image recognition result, rather than the clarity of the characters to be recognized, is used to determine the optimal parameter value combination from the parameter value combination. In this way, the optimal parameter value combination can be determined by electronic equipment, and there is no need to manually debug the light source parameters or manually evaluate the resolvability of the characters to be recognized. Therefore, the debugging cycle for the light source parameters can be shortened, the debugging difficulty can be reduced, and the reliability of the parameter values can be improved.
[0285] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0286] The communication interface is used for communication between the above electronic device and other devices.
[0287] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0288] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0289] In another embodiment provided by the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for determining light source parameters are implemented.
[0290] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any method for determining light source parameters in the above embodiments.
[0291] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state drive (SSD).
[0292] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0293] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, the device, electronic device, computer-readable storage medium, and computer program product embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.
[0294] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A method for determining light source parameters, characterized in that: The method comprises: In response to a region setting operation issued by a user for a character image displayed on a client interface, determining a region to be recognized set by the user for a character region in the character image, wherein the character image is acquired by an image acquisition device for the character to be recognized; When the image acquisition device completes focusing on the area to be recognized, in response to a selection operation issued by the user with respect to a light source identifier displayed on the client interface, obtaining a character image captured by the image acquisition device when light source parameters of a target light source are different combinations of parameter values, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation; Character recognition is performed on the character image to obtain an image recognition result, and based on the image recognition result, an optimal parameter value combination is determined from the parameter value combinations.
2. The method according to claim 1, characterized in that The client interface displays a character image and a region setting trigger control; The step of determining the area to be recognized set by the user for the character area in the character image in response to the area setting operation issued by the user for the character image displayed on the client interface includes: In response to a trigger operation issued by a user for setting a trigger control for the area, following the user issuing a drawing operation for the character image, an icon of the image area indicated by the drawing operation is displayed; In response to the confirmation operation issued by the user, the image area indicated by the drawing operation is used as the area to be recognized.
3. The method according to claim 1, characterized in that The client interface displays an automatic focus trigger control, and / or the client interface displays a motor step value setting area; Before the step of acquiring the character image by the image acquisition device in response to the user's selection operation on the light source identifier displayed on the client interface, in a case where the light source parameters of the target light source are different combinations of parameter values, the method further includes: In response to a trigger operation issued by the user on the automatic focus trigger control, controlling the motor of the image acquisition device to rotate according to a preset motor step value to focus on the area to be identified; or In response to the motor step value set by the user in the motor step value setting area, the motor of the image acquisition device is controlled to rotate according to the motor step value set by the user to focus on the area to be identified.
4. The method according to claim 1, wherein The client interface displays an initial value setting area and a polling trigger control; The step of acquiring, in response to the user's selection operation on the light source identifier displayed on the client interface, a character image captured by the image capture device when the light source parameters of the target light source are different parameter value combinations, comprises: Acquiring the initial value of the light source parameter input by the user based on the initial value setting area; In response to a selection operation issued by the user with respect to a light source identifier displayed on the client interface, determining a target light source corresponding to the light source identifier indicated by the selection operation; In response to the trigger operation issued by the user for the polling trigger control, for the target light source, within the preset parameter value range, according to the preset step size, the light source parameters of the target light source are adjusted based on the initial value, so as to obtain the character image captured by the image acquisition device when the light source parameters of the target light source are different parameter value combinations.
5. The method according to claim 1, wherein The client interface displays an image recognition result display area and an evaluation index setting area; Before the step of performing character recognition on the character image to obtain an image recognition result, the method further includes: Obtaining the evaluation index threshold and the character true value input by the user based on the evaluation index setting area; The step of performing character recognition on the character image to obtain an image recognition result, and determining an optimal parameter value combination from the parameter value combinations based on the image recognition result, includes: Performing character recognition on the character image to obtain character information and evaluation index results; Determine a parameter value combination whose corresponding character information is the same as the character true value and whose corresponding evaluation index result is greater than the evaluation index threshold as a candidate parameter value combination; Determining an optimal parameter value combination from the candidate parameter value combinations based on evaluation index results corresponding to the candidate parameter value combinations; In the image recognition result display area, the character information, the evaluation index result and the optimal light source identifier are displayed, wherein the optimal light source identifier is the light source identifier corresponding to the light source to which the optimal parameter value combination belongs.
6. The method according to any one of claims 1 to 5, characterized in that The client interface displays a parameter write trigger control; The method further comprises: In response to a trigger operation issued by the user on the parameter write trigger control, the parameter value of the optimal light source is set to the optimal parameter value combination, wherein the optimal light source is the light source to which the optimal parameter value group belongs.
7. The method according to claim 4, characterized in that The step of adjusting the light source parameters of the target light source based on the initial value within a preset parameter value range and according to a preset step size to obtain character images captured by the image acquisition device when the light source parameters of the target light source have different parameter value combinations includes: For each light source to be adjusted, for each light source parameter, the parameter values of the other light source parameters are kept unchanged, and the light source parameter of the light source to be adjusted is adjusted according to the preset parameter value range and preset step size corresponding to the light source parameter. Each time the light source parameter is adjusted, the character image captured by the image acquisition device is obtained, wherein, when the number of the target light sources is 1, the light source to be adjusted is the target light source, and when the number of the target light sources is multiple, the light source to be adjusted is each target light source and a target light source combination, and the target light source combination is composed of multiple light sources among the target light sources.
8. The method according to claim 7, characterized in that The step of adjusting the light source parameter of each light source to be adjusted according to a preset parameter value range and a preset step size corresponding to the light source parameter while keeping the parameter values of the other light source parameters unchanged, and obtaining a character image captured by the image capture device each time the light source parameter is adjusted includes: For each light source to be adjusted, for each light source parameter, keep the parameter values of the other light source parameters unchanged, and adjust the light source parameter of the light source to be adjusted to the currently traversed parameter value. In the case of the first traversal, the currently traversed parameter value of the light source parameter is the lower limit of the preset parameter value range corresponding to the light source parameter; Acquire a character image captured by the image acquisition device; Update the currently traversed parameter value to the sum of the currently traversed parameter value of the light source parameter and the preset step size corresponding to the light source parameter, and return to the step of adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter.
9. A device for determining light source parameters, characterized in that: The device comprises: a region setting module, configured to determine, in response to a region setting operation issued by a user for a character image displayed on a client interface, a region to be recognized set by the user for a character region in the character image, wherein the character image is acquired by an image acquisition device for the character to be recognized; an image acquisition module, configured to, when the image acquisition device has focused on the area to be identified, obtain, in response to a selection operation initiated by the user with respect to a light source identifier displayed on the client interface, a character image captured by the image acquisition device when light source parameters of a target light source have different combinations of parameter values, wherein the target light source is the light source corresponding to the light source identifier targeted by the selection operation; The combination determination module is used to perform character recognition on the character image to obtain an image recognition result, and determine the best parameter value combination from the parameter value combinations based on the image recognition result.
10. The device according to claim 9, characterized in that The client interface displays a character image and a region setting trigger control; The regional setting module includes: An icon display submodule, configured to respond to a trigger operation issued by a user for setting a trigger control for the area, and following the user issuing a drawing operation for the character image, display an icon of the image area indicated by the drawing operation; an area setting submodule, configured to, in response to a confirmation operation issued by the user, use the image area indicated by the drawing operation as an area to be identified; and / or, The client interface displays an automatic focus trigger control, and / or the client interface displays a motor step value setting area; The device further comprises: a first focusing module, configured to control the motor of the image acquisition device to rotate according to a preset motor step value in response to a trigger operation issued by the user on the automatic focus trigger control, so as to focus on the area to be identified; a second focusing module, configured to control the motor of the image acquisition device to rotate in response to the motor step value set by the user in the motor step value setting area, so as to focus on the area to be identified according to the motor step value set by the user; and / or The client interface displays an initial value setting area and a polling trigger control; The image acquisition module includes: An initial value acquisition submodule, configured to acquire the initial value of the light source parameter input by the user based on the initial value setting area; a target light source determination submodule, configured to, in response to a selection operation issued by the user with respect to the light source identifier displayed on the client interface, determine a target light source corresponding to the light source identifier indicated by the selection operation; an image acquisition submodule, configured to, in response to a trigger operation issued by the user on the polling trigger control, adjust the light source parameters of the target light source within a preset parameter value range, according to a preset step size, and based on the initial value, to obtain character images captured by the image acquisition device when the light source parameters of the target light source have different parameter value combinations; and / or The client interface displays an image recognition result display area and an evaluation index setting area; The device further comprises: An indicator acquisition module, configured to acquire the evaluation indicator threshold and the character true value input by the user based on the evaluation indicator setting area; The combination determination module includes: A character recognition submodule, configured to perform character recognition on the character image to obtain character information and evaluation index results; a candidate combination determination submodule, configured to determine, as a candidate parameter value combination, a parameter value combination whose corresponding character information is the same as the character true value and whose corresponding evaluation index result is greater than the evaluation index threshold; An optimal combination determination submodule, configured to determine an optimal parameter value combination from the candidate parameter value combinations based on evaluation index results corresponding to the candidate parameter value combinations; A result display submodule is configured to display the character information, the evaluation index results, and the optimal light source identifier in the image recognition result display area, wherein the optimal light source identifier is the light source identifier corresponding to the light source to which the optimal parameter value combination belongs; and / or, The client interface displays a parameter write trigger control; The device further comprises: a parameter value writing module, configured to set the parameter value of the optimal light source to the optimal parameter value combination in response to a trigger operation issued by the user on the parameter writing trigger control, wherein the optimal light source is the light source to which the optimal parameter value group belongs; and / or The image acquisition submodule includes: an image acquisition unit, configured to, for each light source parameter to be adjusted, maintain the parameter values of the other light source parameters unchanged, adjust the light source parameter of the light source to be adjusted according to a preset parameter value range and a preset step size corresponding to the light source parameter, and acquire a character image captured by the image acquisition device each time the light source parameter is adjusted, wherein, when the number of the target light sources is one, the light source to be adjusted is the target light source; when the number of the target light sources is multiple, the light source to be adjusted is each target light source and a target light source combination, and the target light source combination is composed of multiple light sources among the target light sources; and / or, The image acquisition unit includes: a parameter value adjustment subunit, for each light source parameter to be adjusted, keeping the parameter values of the other light source parameters unchanged, and adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value, wherein, in the case of the first traversal, the currently traversed parameter value of the light source parameter is the lower limit of the preset parameter value range corresponding to the light source parameter; An image acquisition subunit, configured to acquire the character image acquired by the image acquisition device; The parameter value updating subunit is used to update the currently traversed parameter value to the sum of the currently traversed parameter value of the light source parameter and the preset step size corresponding to the light source parameter, and return to the step of adjusting the light source parameter of the light source to be adjusted to the currently traversed parameter value until the currently traversed parameter value is greater than the upper limit of the preset parameter value range corresponding to the light source parameter.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 8 when executing a program stored in a memory.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.