Code reader parameter automatic adjustment method and device, and storage medium

By obtaining the candidate brightness range in the code reader, adjusting the brightness value and image acquisition parameters, calculating the decoding score, and automatically determining the target fill light and brightness value, the parameter adjustment problem of fixed code reader in complex environments is solved, and the rapid and accurate code reader parameter search is achieved, and the deployment efficiency of the code reader is improved.

CN120278172APending Publication Date: 2025-07-08ZHEJIANG HUARAY TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510218552.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing fixed code readers need to adjust a large number of parameters in complex environments, and the coupling between parameters is high, resulting in a long debugging time, making it difficult to meet the requirements of high read rate and read speed in industrial scenarios.

Method used

By obtaining the candidate brightness range, selecting brightness values, adjusting image acquisition parameters, collecting candidate barcode images, calculating decoding scores, determining the target fill light and brightness values, and obtaining the target code reading parameters.

Benefits of technology

It realizes automatic adjustment of code reader parameters, quickly and accurately finds the optimal parameters, improves deployment and debugging efficiency, and avoids slow search speed caused by overexposure or overdark images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278172A_ABST
    Figure CN120278172A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic parameter adjustment method and device for a code reader and a storage medium, and the method comprises the steps: obtaining a plurality of candidate brightness values, adjusting image collection parameters under all types of light supplement lamps based on the plurality of candidate brightness values, carrying out the collection of a barcode image, obtaining a candidate barcode image sequence, and carrying out the collection of the barcode image according to the candidate barcode image sequence. Decoding each candidate bar code image, respectively calculating a decoding score of each candidate bar code image to obtain a decoding score sequence, determining light supplement lamps of which the decoding score sequences meet a preset condition to obtain a target light supplement lamp, and determining a target brightness value meeting the preset condition in the decoding score sequence corresponding to the target light supplement lamp, the image acquisition parameters corresponding to the target light supplement lamp and the target brightness value serve as the target code reading parameters, automatic adjustment of code reader parameters under multiple types of light supplement lamps can be achieved, the optimal code reader parameters can be quickly and accurately found out, and the deployment and debugging efficiency of code readers is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of barcode readers, and in particular, to a method, device, and storage medium for automatically adjusting parameters of a barcode reader. Background Art

[0002] With the rapid development of one-dimensional code / two-dimensional code technology, one-dimensional codes / two-dimensional codes have been widely used in daily life and industrial production processes. Existing barcode readers can be roughly divided into two categories. One is a barcode reader with a fixed code and a movable barcode reader that reads a fixed barcode to be scanned. The other is a fixed barcode reader that moves the barcode to be scanned into the field of view of the barcode reader for reading.

[0003] Among them, fixed barcode readers generally need to adjust algorithm parameters according to the on-site environment during equipment installation, including focusing, adjusting exposure gain, adjusting barcode reading algorithm parameters, etc. In actual application scenarios, various situations such as reflection and complex backgrounds are often encountered. Especially in industrial scenarios, there are high requirements for reading rate and reading speed, resulting in a large number of parameters that need to be adjusted for fixed barcode readers, and the coupling between the adjusted parameters is high. Even professional technicians need a long time to debug to the optimal parameters. Summary of the Invention

[0004] In order to improve the accuracy and rate of barcode reader parameter adjustment, the present application provides at least a method, device, and storage medium for automatically adjusting parameters of a barcode reader.

[0005] In a first aspect of the present application, a method for automatically adjusting parameters of a barcode reader is provided. The method includes: obtaining a candidate brightness range, selecting brightness values within the candidate brightness range to obtain a plurality of candidate brightness values; adjusting image acquisition parameters under each type of supplementary light based on the plurality of candidate brightness values to collect barcode images, and obtaining a candidate barcode image sequence collected by each type of supplementary light for different candidate brightness values; wherein, the difference between the image brightness value of the candidate barcode image in the candidate barcode image sequence and the corresponding candidate brightness value is less than a preset threshold, and the image acquisition parameters include exposure and / or gain; decoding each candidate barcode image, and respectively calculating the decoding score of each candidate barcode image to obtain a decoding score sequence of each type of supplementary light at different candidate brightness values; wherein, the decoding score is used to measure the difficulty of decoding the candidate barcode image; determining the supplementary light whose decoding score sequence meets the preset conditions to obtain the target supplementary light, and determining the candidate brightness value corresponding to the decoding score that meets the preset conditions in the decoding score sequence corresponding to the target supplementary light to obtain the target brightness value; using the image acquisition parameters corresponding to the target supplementary light and the target brightness value as the target barcode reading parameters.

[0006] In one embodiment, an initial brightness range is obtained, brightness values are selected within the initial brightness range to obtain a plurality of initial brightness values; image acquisition parameters are adjusted based on the initial brightness values to acquire a bar code image, and an initial bar code image acquired for the initial brightness values is obtained; wherein, the difference between the image brightness value of the initial bar code image and the initial brightness value is less than a preset threshold; the initial bar code image is decoded, and in response to successful decoding of the initial bar code image, a candidate brightness range is obtained by dividing based on the initial brightness value corresponding to the successfully decoded initial bar code image.

[0007] In one embodiment, different types of fill lights correspond to different initial brightness ranges; obtaining the initial brightness range includes: for any type of fill light, obtaining the maximum exposure, minimum exposure, maximum gain, and minimum gain of the fill light; acquiring a bar code image based on the maximum exposure and maximum gain under the fill light to obtain a first bar code image, and acquiring a bar code image based on the minimum exposure and minimum gain under the fill light to obtain a second bar code image; calculating the image brightness value corresponding to the first bar code image to obtain a maximum brightness value, and calculating the image brightness value corresponding to the second bar code image to obtain a minimum brightness value; obtaining the initial brightness range corresponding to the fill light based on the minimum brightness value and the maximum brightness value.

[0008] In one embodiment, selecting brightness values within the initial brightness range to obtain a plurality of initial brightness values includes: selecting brightness values from within the initial brightness range using different brightness steps to obtain initial brightness values corresponding to the different brightness steps respectively; adjusting image acquisition parameters based on the initial brightness values to acquire a bar code image, including: sorting the initial brightness values corresponding to the different brightness steps in descending order according to the magnitude of the brightness step to obtain a sequence of initial brightness values to be traversed; traversing the initial brightness values in the sequence of initial brightness values one by one, and adjusting image acquisition parameters based on the currently traversed initial brightness value to acquire a bar code image acquired for the currently traversed initial brightness value.

[0009] In one embodiment, obtaining a candidate brightness range by dividing based on the initial brightness value corresponding to the successfully decoded initial bar code image includes: calculating a decoding score of the initial bar code image, and calculating the range size of the candidate brightness range to be divided based on the decoding score of the initial bar code image; wherein, the decoding score of the initial bar code image is inversely proportional to the range size; taking the initial brightness value as the center and dividing to obtain the candidate brightness range according to the range size.

[0010] In one embodiment, determining the fill light whose decoding score sequence meets the preset conditions to obtain the target fill light includes: counting the maximum decoding score in each decoding score sequence, selecting the decoding score sequence with the highest maximum decoding score value to obtain the decoding score sequence that meets the preset conditions, and using the fill light whose decoding score sequence meets the preset conditions as the target fill light; alternatively, calculating the average decoding score corresponding to each decoding score sequence, selecting the decoding score sequence with the highest average decoding score value to obtain the decoding score sequence that meets the preset conditions, and using the fill light whose decoding score sequence meets the preset conditions as the target fill light; alternatively, obtaining a preset score threshold, respectively counting the number of decoding scores greater than the preset score threshold in each decoding score sequence, using the decoding score sequence with the largest number as the decoding score sequence that meets the preset conditions, and using the fill light whose decoding score sequence meets the preset conditions as the target fill light.

[0011] In one embodiment, determining the candidate brightness value corresponding to the decoding score that meets the preset conditions in the decoding score sequence corresponding to the target fill light to obtain the target brightness value includes: obtaining a preset number of adjacent candidate brightness values to obtain multiple brightness combinations; obtaining the decoding scores calculated for the candidate brightness values included in the brightness combination in the decoding score sequence corresponding to the target fill light, performing a summation calculation on the decoding scores corresponding to each candidate brightness value in the brightness combination to obtain the comprehensive score corresponding to the brightness combination; and obtaining the target brightness value based on the brightness combination with the highest comprehensive score.

[0012] In one embodiment, using the image acquisition parameters corresponding to the target fill light and the target brightness value as the target code reading parameters includes: obtaining the barcode attribute information corresponding to the candidate barcode image, and obtaining the decoding algorithm parameters corresponding to the decoding score that meets the preset conditions; associating the barcode attribute information, the decoding algorithm parameters, and the image acquisition parameters corresponding to the target fill light and the target brightness value to obtain the target code reading parameters.

[0013] The second aspect of the present application provides a device for automatically adjusting the parameters of a barcode reader. The device includes: a candidate brightness acquisition module, configured to acquire a candidate brightness range, select brightness values within the candidate brightness range, and obtain a plurality of candidate brightness values; an image acquisition module, configured to adjust image acquisition parameters under each type of fill light based on the plurality of candidate brightness values respectively to acquire barcode images, and obtain a candidate barcode image sequence acquired by each type of fill light for different candidate brightness values respectively; wherein, the difference between the image brightness value of the candidate barcode image in the candidate barcode image sequence and the corresponding candidate brightness value is less than a preset threshold, and the image acquisition parameters include exposure and / or gain; a decoding score calculation module, configured to decode each candidate barcode image, and calculate the decoding score of each candidate barcode image respectively to obtain a decoding score sequence of each type of fill light under different candidate brightness values respectively; wherein, the decoding score is used to measure the difficulty of decoding the candidate barcode image; a fill light and brightness value selection module, configured to determine the fill light for which the decoding score sequence meets the preset condition to obtain the target fill light, and determine the candidate brightness value corresponding to the decoding score that meets the preset condition in the decoding score sequence corresponding to the target fill light to obtain the target brightness value; a barcode reading parameter determination module, configured to use the image acquisition parameters corresponding to the target fill light and the target brightness value as the target barcode reading parameters.

[0014] The third aspect of the present application provides an electronic device, including a memory and a processor, where the processor is configured to execute program instructions stored in the memory to implement the above method for automatically adjusting the parameters of the barcode reader.

[0015] The fourth aspect of the present application provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the above method for automatically adjusting the parameters of the barcode reader is implemented.

[0016] In the above solution, by obtaining a candidate brightness range, selecting brightness values within the candidate brightness range to obtain multiple candidate brightness values, adjusting image acquisition parameters under each type of supplementary light based on the multiple candidate brightness values to collect barcode images, obtaining a candidate barcode image sequence collected by each type of supplementary light for different candidate brightness values, decoding each candidate barcode image, and calculating the decoding scores of each candidate barcode image respectively, obtaining a decoding score sequence of each type of supplementary light at different candidate brightness values, determining the supplementary light whose decoding score sequence meets the preset conditions to obtain the target supplementary light, and determining the candidate brightness value corresponding to the decoding score that meets the preset conditions in the decoding score sequence corresponding to the target supplementary light to obtain the target brightness value, and using the image acquisition parameters corresponding to the target supplementary light and the target brightness value as the target barcode reading parameters, it is possible to automatically adjust the parameters of the barcode reader under multiple types of supplementary lights, and can quickly and accurately find the optimal barcode reader parameters, improving the deployment and debugging efficiency of the barcode reader. Moreover, through the barcode search strategy with brightness as the independent variable, it is possible to effectively avoid the slow search speed caused by the weak change in the brightness of the exposure and gain images when the image is overexposed or underexposed with a fixed step size adjustment.

[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit this application. Brief Description of the Drawings

[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification. These drawings illustrate embodiments consistent with this application and are used together with the specification to explain the technical solutions of this application.

[0019] Figure 1 It is a schematic diagram of the solution implementation environment shown in an exemplary embodiment of this application;

[0020] Figure 2 It is a flowchart of the method for automatically adjusting the parameters of the barcode reader shown in an exemplary embodiment of this application;

[0021] Figure 3 It is a schematic diagram of collecting candidate barcode images shown in an exemplary embodiment of this application;

[0022] Figure 4 It is a schematic diagram of selecting multi-level initial brightness values shown in an exemplary embodiment of this application;

[0023] Figure 5 It is a block diagram of the device for automatically adjusting the parameters of the barcode reader shown in an exemplary embodiment of this application;

[0024] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this application;

[0025] Figure 7 It is a schematic structural diagram of a computer-readable storage medium shown in an exemplary embodiment of the present application. Detailed implementation manners

[0026] Next, in conjunction with the accompanying drawings of the specification, the solutions of the embodiments of the present application will be described in detail.

[0027] In the following description, specific details such as specific system structures, interfaces, and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the present application.

[0028] The term "and / or" in this article is merely an association information describing associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the front and rear associated objects. In addition, "multiple" in this article means two or more than two. In addition, the term "at least one" in this article represents any one of multiple types or any combination of at least two of multiple types. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set composed of A, B, and C.

[0029] Next, the method for automatically adjusting the parameters of the barcode reader provided by the embodiments of the present application will be described.

[0030] Please refer to Figure 1 , Figure 1 It is a schematic diagram of the solution implementation environment shown in an exemplary embodiment of the present application. The solution implementation environment may include a barcode reader 110 and a server 120, and the barcode reader 110 and the server 120 are communicatively connected to each other.

[0031] The barcode reader 110 is used to collect barcode images and decode the collected barcode images.

[0032] It should be noted that the barcode reader 110 of the present application is deployed with various types of fill lights, and the fill lights are used for light compensation. Different types of fill lights may have different lights used for light compensation, such as polarized light, natural light, etc.; different types of fill lights may also have different deployment positions and / or different light intensities, etc.

[0033] Server 120 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0034] In one example, server 120 can analyze the barcode image collected by the reader 110 to determine the target reading parameters of the reader 110, and then, server 120 can transmit the target reading parameters back to the reader 110.

[0035] In one example, a client of the target application is installed and run in the reader 110. The target application can be an application that provides the function of automatically adjusting parameters. Based on the target application, the parameters are automatically adjusted to obtain the target reading parameters. Server 120 can be the background server of the target application, which is used to provide background services for the client of the target application.

[0036] In the method for automatically adjusting the parameters of the reader provided by the embodiments of the present application, the execution subject of each step can be the reader 110, such as the client of the target application installed and run in the reader 110, or the server 120, or the reader 110 and the server 120 interact and cooperate to execute, that is, a part of the steps of the method are executed by the reader 110 and another part of the steps are executed by the server 120.

[0037] Please refer to Figure 2 , Figure 2 is a flowchart of the method for automatically adjusting the parameters of the reader shown in an exemplary embodiment of the present application. The method for automatically adjusting the parameters of the reader can be applied to Figure 1 the implementation environment shown, and is specifically executed by the reader in this implementation environment. It should be understood that this method can also be applicable to other exemplary implementation environments and is specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment applicable to this method.

[0038] As Figure 2 shown, the method for automatically adjusting the parameters of the reader includes at least steps S210 to S250, which are introduced in detail as follows:

[0039] Step S210: Obtain a candidate brightness range, select brightness values within the candidate brightness range to obtain multiple candidate brightness values.

[0040] Among them, the candidate brightness range can be preset according to experience or flexibly calculated according to the actual application scenario. For example, the candidate brightness range can be flexibly calculated according to the type of fill light, and / or the ambient brightness of the application scenario, and / or the image acquisition effect, etc.

[0041] In addition, it can be that multiple types of fill lights correspond to the same candidate brightness range, or different types of fill lights correspond to different candidate brightness ranges respectively. This application does not limit this.

[0042] Select brightness values within the candidate brightness range to obtain multiple candidate brightness values.

[0043] For example, the brightness values can be selected within the candidate brightness range using a preset step size to obtain multiple candidate brightness values; or the brightness values can be selected within the candidate brightness range using multiple different step sizes respectively to obtain multiple candidate brightness values. This application does not limit this.

[0044] Step S220: Based on multiple candidate brightness values, adjust the image acquisition parameters under each type of fill light to collect barcode images, and obtain a candidate barcode image sequence collected by each type of fill light for different candidate brightness values.

[0045] Among them, the difference between the image brightness value of the candidate barcode image in the candidate barcode image sequence and the corresponding candidate brightness value is less than a preset threshold, and the image acquisition parameters include exposure and / or gain.

[0046] Traverse the multiple candidate brightness values corresponding to each fill light respectively. For the current fill light and the current candidate brightness value, turn on the current fill light, adjust the exposure and / or gain of the barcode reader to perform image acquisition. If the difference between the image brightness value of the collected barcode image and the current candidate brightness value is less than the preset threshold, then use this barcode image as the candidate barcode image collected by the current fill light for the current candidate brightness value. Among them, when traversing the candidate brightness values, it can be traversed in ascending or descending order, or not in any order. This application does not limit this.

[0047] Repeat the above steps to obtain a candidate barcode image sequence collected by each type of fill light for different candidate brightness values.

[0048] For example, please refer to Figure 3 , Figure 3 is a schematic diagram of collecting candidate barcode images shown in an exemplary embodiment of this application. As Figure 3 shown, it includes:

[0049] Step S221: Read the candidate brightness values corresponding to different types of fill lights in sequence to obtain the current fill light and the current candidate brightness value.

[0050] Step S222: Turn on the current fill light, adjust the exposure and / or gain to perform image acquisition, and obtain a bar code image.

[0051] Step S223: Calculate the image brightness value of the bar code image.

[0052] It can be to calculate the average brightness of the bar code image to obtain the image brightness value, or to count the median of the brightness of each pixel of the bar code image to obtain the image brightness value. This application does not limit the calculation method of the image brightness value.

[0053] Step S224: Whether the difference between the image brightness value and the current candidate brightness value is less than a preset threshold. If so, execute Step S225; if not, execute Step S222.

[0054] The preset threshold can be preset according to experience.

[0055] Step S225: Whether the candidate brightness values corresponding to different types of fill lights have been traversed. If so, execute Step S226; if not, execute Step S221.

[0056] Step S226: Output the candidate bar code image sequences collected by each type of fill light for different candidate brightness values respectively.

[0057] Finally, each type of fill light will obtain a candidate bar code image sequence.

[0058] Step S230: Decode each candidate bar code image, and calculate the decoding score of each candidate bar code image respectively to obtain the decoding score sequences of each type of fill light at different candidate brightness values; wherein, the decoding score is used to measure the difficulty of decoding the candidate bar code image.

[0059] Decode each candidate bar code image in the candidate bar code image sequence corresponding to each fill light, and judge the difficulty of decoding the candidate bar code image to obtain the decoding score sequences of each type of fill light at different candidate brightness values.

[0060] For example, set the decoding ability of the decoding algorithm to the maximum, that is, turn on all code systems, support positive and negative colors, ignore mirroring, and set the decoding timeout to the maximum to decode the candidate bar code image.

[0061] Among them, the difficulty level of decoding a candidate bar code image can be evaluated based on, for example, the length of time used for decoding the candidate bar code image, and / or the amount of computing power resources used, and / or the complexity of the image preprocessing algorithm used, etc., so as to obtain the decoding score of the candidate bar code image; among them, the image preprocessing algorithm includes, but is not limited to, erosion, dilation, opening operation, closing operation, filtering, sharpening, binarization, etc.

[0062] For example, the longer the time used for decoding the candidate bar code image, and / or the more computing power resources used, and / or the more image preprocessing algorithms used, the lower the decoding score of the candidate bar code image; conversely, the shorter the time used for decoding the candidate bar code image, and / or the fewer computing power resources used, and / or the fewer image preprocessing algorithms used, the higher the decoding score of the candidate bar code image.

[0063] It should be noted that if there are multiple bar codes to be decoded in the candidate bar code image, the decoding score corresponding to each bar code can be calculated, and then the highest decoding score, or the lowest decoding score, or the average value of multiple decoding scores, etc. can be selected as the decoding score of the candidate bar code image.

[0064] Step S240: Determine the fill light whose decoding score sequence meets the preset conditions to obtain the target fill light, and determine the candidate brightness value corresponding to the decoding score that meets the preset conditions in the decoding score sequence corresponding to the target fill light to obtain the target brightness value.

[0065] Judge whether each decoding score sequence meets the preset conditions.

[0066] Exemplarily, it can be judged whether the decoding score sequence meets the preset conditions according to the maximum decoding score corresponding to the decoding score sequence, or the average decoding score, or the number of decoding scores greater than the preset score threshold, etc. The present application does not limit this.

[0067] Take the fill light whose decoding score sequence meets the preset conditions as the target fill light, and obtain the decoding score sequence corresponding to the target fill light, and judge whether the decoding score in the decoding score sequence corresponding to the target fill light meets the preset conditions.

[0068] Exemplarily, the maximum decoding score in the decoding score sequence corresponding to the target fill light can be judged to meet the preset conditions; it can also be judged that the decoding score greater than the preset score threshold in the decoding score sequence corresponding to the target fill light meets the preset conditions. The present application does not limit this.

[0069] Take the candidate brightness value corresponding to the decoding score that meets the preset conditions as the target brightness value.

[0070] It should be noted that the number of the above-mentioned target supplementary lights and target brightness values can be one or multiple, and the present application does not limit this.

[0071] The optimal parameters are selected through the decoding score to improve the accuracy of the selected parameters.

[0072] Step S250: Use the image acquisition parameters corresponding to the target supplementary light and the target brightness value as the target code reading parameters.

[0073] In the parameter automatic adjustment stage, if the code reader detects that there is a code to be scanned within the field of view, the parameters are adjusted through the above steps to obtain the image acquisition parameters corresponding to the target supplementary light and the target brightness value, and these parameters are used as the target code reading parameters. Subsequently, the target code reading parameters can be directly used for image acquisition and decoding.

[0074] Among them, the target code reading parameters, in addition to the image acquisition parameters corresponding to the above-mentioned supplementary light and brightness value, may also include the image preprocessing algorithm used for decoding, and the present application does not limit this.

[0075] It should be noted that for scenarios with fewer types of codes to be scanned, such as scanning the same type of product in an industrial scenario, the change of the code to be scanned in the image is small at this time, and only one set of target code reading parameters can be used for image acquisition and decoding; while for scenarios with more types of codes to be scanned, one set of target code reading parameters can be debugged for each type of code to be scanned to improve the decoding accuracy and efficiency of the code reader.

[0076] Exemplarily, obtain the barcode attribute information corresponding to the candidate barcode image, and obtain the decoding algorithm parameters corresponding to the decoding score that meets the preset conditions; associate the barcode attribute information, the decoding algorithm parameters, and the image acquisition parameters corresponding to the target supplementary light and the target brightness value to obtain the target code reading parameters.

[0077] Among them, the barcode attribute information includes the type of code, pixel size, mirror image, polarity, version range, etc.

[0078] Subsequently, when scanning the code, if it is detected that the similarity between the barcode attribute information of the currently scanned code and the barcode attribute information associated with the target code reading parameters is greater than the preset similarity threshold, the target code reading parameters are used for image acquisition and decoding.

[0079] In this application, candidate barcode images collected by different types of supplementary lights for different candidate brightness values are obtained, and the decoding scores of each candidate barcode image are calculated. Then, the supplementary light with a decoding score sequence meeting the preset conditions is selected to obtain the target supplementary light, and the candidate brightness value corresponding to the decoding score meeting the preset conditions in the decoding score sequence corresponding to the target supplementary light is determined to obtain the target brightness value. This can achieve the automatic adjustment of the reader parameters under multiple types of supplementary lights, quickly and accurately find the optimal reader parameters, and improve the deployment and debugging efficiency of the reader.

[0080] Next, some embodiments of this application will be described in detail.

[0081] In some embodiments, obtaining the candidate brightness range in step S210 includes the following steps S211 to S213:

[0082] Step S211: Obtain the initial brightness range, select brightness values within the initial brightness range to obtain multiple initial brightness values.

[0083] Among them, the initial brightness range can be preset according to experience, such as 0 to 255; the initial brightness range can also be flexibly calculated according to the actual situation.

[0084] For example, different types of supplementary lights correspond to different initial brightness ranges; obtaining the initial brightness range includes: for any type of supplementary light, obtaining the maximum exposure, minimum exposure, maximum gain, and minimum gain of the supplementary light; collecting barcode images based on the maximum exposure and maximum gain under the supplementary light to obtain the first barcode image, and collecting barcode images based on the minimum exposure and minimum gain under the supplementary light to obtain the second barcode image; calculating the image brightness value corresponding to the first barcode image to obtain the maximum brightness value, and calculating the image brightness value corresponding to the second barcode image to obtain the minimum brightness value; obtaining the initial brightness range corresponding to the supplementary light based on the minimum brightness value and the maximum brightness value.

[0085] For example, the minimum exposure corresponding to the supplementary light with the serial number ltn is E min_ltn , the maximum exposure is E max_ltn , the minimum gain is G min_ltn , and the maximum gain is G max_ltn .

[0086] Turn on the supplementary light ltn, collect barcode images using the maximum exposure and maximum gain respectively to obtain the first barcode image, and calculate the image brightness value corresponding to the first barcode image to obtain the maximum brightness value B max_ltn ; and collect barcode images using the minimum exposure and minimum gain respectively to obtain the second barcode image, and calculate the image brightness value corresponding to the second barcode image to obtain the minimum brightness value B min_ltn。

[0087] Based on the minimum brightness value and the maximum brightness value, the initial brightness range corresponding to the fill light ltn is obtained as [B min_ltn , B max_ltn .

[0088] Of course, different types of fill lights can correspond to different initial brightness ranges, and different types of fill lights can also correspond to the same initial brightness range. For example, based on the minimum brightness values and the maximum brightness values respectively corresponding to all types of fill lights, the brightness ranges respectively corresponding to each type of fill light are obtained. Then, the union of the brightness ranges respectively corresponding to each type of fill light is taken to obtain the initial brightness range corresponding to each type of fill light.

[0089] Then, brightness values are selected within the initial brightness range to obtain multiple initial brightness values.

[0090] For example, brightness values can be selected within the initial brightness range according to a preset step size to obtain multiple initial brightness values.

[0091] For another example, different brightness step sizes can also be used to select brightness values from the initial brightness range to obtain the initial brightness values respectively corresponding to different brightness step sizes.

[0092] By using different brightness step sizes, brightness values of different search levels are selected.

[0093] Taking the fill light ltn as an example for illustration, please refer to Figure 4 , Figure 4 which is a schematic diagram of multi-level initial brightness value selection shown in an exemplary embodiment of the present application. As Figure 4 shown, according to the number n of brightness values corresponding to the first search level and the minimum brightness value B min_ltn and the maximum brightness value B max_ltn of the initial brightness range, calculate the brightness step size B step =(B max_ltn -B min_ltn ) / n, where n is an even number. And, according to the minimum brightness value B min_ltn and the maximum brightness value B max_ltn of the initial brightness range, calculate the reference brightness value B0=(B max_ltn +B min_ltn ) / 2. Then, according to the brightness step size B step and the reference brightness value B0, select the initial brightness values corresponding to the first search level. Specifically, the relevant formula for calculating the initial brightness values corresponding to the first search level is expressed as the following formula 1:

[0094]

[0095] Wherein, the value of i is a positive integer less than or equal to n.

[0096] Based on the above formula 1, the initial brightness value sequence corresponding to the first search level is calculated. For example, when n is 4, the initial brightness value sequence corresponding to the first search level includes B0, B1, B2, B3, B4 as shown in Figure 4 .

[0097] Then, according to the initial brightness values corresponding to the first search level, the initial brightness value sequence corresponding to the second search level is calculated. For example, two adjacent initial brightness values in the first search level are obtained, and the average value of the two adjacent initial brightness values is calculated to obtain the initial brightness value corresponding to the second search level. By comprehensively calculating all the obtained average values, the initial brightness value sequence corresponding to the second search level is obtained. Taking Figure 4 as an example, B0 and B1 are adjacent, and the average value of B0 and B1 is calculated to obtain B M0 , and so on, and B M1 , B M2 , B M3 are further calculated.

[0098] Furthermore, the initial brightness value sequence corresponding to the third search level can also be calculated according to the initial brightness values corresponding to the second search level. Similarly, two adjacent initial brightness values in the first search level and the second search level are obtained, and the average value of the two adjacent initial brightness values is calculated to obtain the initial brightness value corresponding to the third search level. By comprehensively calculating all the obtained average values, the initial brightness value sequence corresponding to the third search level is obtained. Taking Figure 4 as an example, B0 and B M0 are adjacent, and the average value of B0 and B M0 is calculated to obtain B F0 , and so on, and B F1 , B F2 , B F3 , B F4 , B F5 , B F6 , B F7 are further calculated.

[0099] Combining the initial brightness value sequences of each search level, the initial brightness value sequence corresponding to the supplementary light ltn is obtained.

[0100] For each type of supplementary light, the above-mentioned initial brightness value selection is performed to obtain the initial brightness value sequence corresponding to each type of supplementary light respectively.

[0101] Figure 4 Only three search levels are taken as examples in , and in the actual application scenario, the brightness value selection of more or fewer search levels can be performed, and the present application does not limit this.

[0102] Step S212: Adjust the image acquisition parameters based on the initial brightness value to acquire the bar code image, and obtain the initial bar code image acquired for the initial brightness value.

[0103] Wherein, the difference between the image brightness value of the initial bar code image and the initial brightness value is less than a preset threshold.

[0104] Traverse each initial brightness value in sequence, and adjust the image acquisition parameters according to the initial brightness value to acquire the bar code image, and obtain the initial bar code image acquired for the initial brightness value.

[0105] When acquiring the bar code image based on the initial brightness value, it may be to acquire the initial bar code image for each type of supplementary light, etc., or to acquire the initial bar code image for at least one type of supplementary light. This application does not limit this.

[0106] Optionally, if when selecting the brightness value within the initial brightness range, a multi-brightness step size is used for the brightness value selection, and different brightness step sizes correspond to different search levels, then adjusting the image acquisition parameters based on the initial brightness value to acquire the bar code image, and obtaining the initial bar code image acquired for the initial brightness value includes: sorting the initial brightness values corresponding to different brightness step sizes in descending order according to the magnitude of the brightness step size to obtain the sequence of initial brightness values to be traversed; traversing the initial brightness values in the sequence of initial brightness values in sequence, and adjusting the image acquisition parameters based on the currently traversed initial brightness value to acquire the bar code image, and obtaining the initial bar code image acquired for the currently traversed initial brightness value.

[0107] For example, Figure 4 the sequence of initial brightness values with the largest medium brightness step size includes B0, B1, B2, B3, B4, and then it is the sequence of initial brightness values B M0 , B M1 , B M2 , B M3 , and finally the sequence of initial brightness values with the smallest brightness step size includes B F0 , B F1 , B F2 , B F3 , B F4 , B F5 , B F6 , B F7 , then first traverse B0, B1, B2, B3, B4, then traverse B M0 , B M1 , B M2 , B M3 , and finally traverse B F0 , B F1 , B F2 , BF3 , B F4 , B F5 , B F6 , B F7 .

[0108] Of course, it is also possible to traverse in sequence according to the magnitude of the brightness value, or to traverse the brightness values randomly. This application does not limit this.

[0109] Since there are many types of reader parameters to be adjusted and there will be a very large number of parameter combination situations to be traversed during the parameter adjustment process, after selecting the brightness values according to different search levels, the selected brightness values are traversed level by level in sequence, which greatly improves the search efficiency while ensuring that various complex scenarios can be handled.

[0110] Step S213: Decode the initial barcode image. In response to successful decoding of the initial barcode image, a candidate brightness range is obtained based on the initial brightness value corresponding to the successfully decoded initial barcode image.

[0111] If the initial barcode image is successfully decoded, it indicates that the initial brightness value corresponding to the current initial barcode image is available. Therefore, a candidate brightness range is obtained by dividing around the initial brightness value, and then parameter optimization adjustment is performed within the candidate brightness range to improve the parameter adjustment efficiency and obtain more accurate reading parameters.

[0112] For example, obtain the size of the preset brightness range, and then, with the initial brightness value as the center, divide to obtain the candidate brightness range according to the size of the preset brightness range.

[0113] For another example, calculate the decoding score of the initial barcode image, and calculate the size of the candidate brightness range to be divided based on the decoding score of the initial barcode image; wherein, the decoding score of the initial barcode image is inversely proportional to the size of the range; with the initial brightness value as the center, divide to obtain the candidate brightness range according to the size of the range.

[0114] That is, the smaller the decoding score of the initial barcode image, the larger the size of the range, and the larger the decoding score of the initial barcode image, the smaller the size of the range. Flexibly calculating the size of the range according to the decoding score of the initial barcode image can not only avoid the omission of the optimal brightness value, but also reduce the number of candidate brightness values that need to be traversed and calculated subsequently. Furthermore, on the premise of ensuring the accuracy of the candidate brightness range obtained by division, the calculation amount is reduced and the parameter adjustment efficiency is improved.

[0115] Of course, the candidate brightness range may not be divided centered around the initial brightness value. The initial brightness value is only used as a reference value for dividing the candidate brightness range. For example, the candidate brightness range may also be divided with the initial brightness value as the minimum value or the maximum value. For example, when sequentially traversing the initial brightness values from small to large, if the decoding of the initial barcode image corresponding to the currently traversed initial brightness value is successful, the candidate brightness range is divided with the currently traversed initial brightness value as the minimum value, that is, the currently traversed initial brightness value is used as the minimum value in the finally divided candidate brightness range.

[0116] Then, brightness values are selected within the candidate brightness range to obtain multiple candidate brightness values.

[0117] The selection method of the candidate brightness values can be the same as that of the initial brightness value, and this application will not elaborate here.

[0118] In some embodiments, the candidate brightness range in the above embodiments may be divided for each type of fill light respectively, that is, different candidate brightness ranges are divided for each type of fill light, so that each type of fill light respectively corresponds to a different sequence of candidate brightness values.

[0119] Then, according to the multiple candidate brightness values, the image acquisition parameters are adjusted under each type of fill light to collect barcode images, obtaining a sequence of candidate barcode images collected by each type of fill light for different candidate brightness values, and decoding each candidate barcode image, calculating the decoding scores of each candidate barcode image respectively, to obtain the decoding score sequences of each type of fill light at different candidate brightness values.

[0120] In some embodiments, if the candidate brightness range is divided near the initial brightness value corresponding to the successfully decoded initial barcode image according to the above embodiments, when it is detected that the decoding of the initial barcode image is successful, the position of the successfully decoded barcode is recorded to obtain a reference position. Then, after collecting the barcode image according to the candidate brightness value, the image content at the reference position in the collected original barcode image is intercepted, and the intercepted image content is used as the candidate barcode image.

[0121] In some embodiments, determining the fill light whose decoding score sequence meets the preset conditions in step S240 to obtain the target fill light includes: counting the maximum decoding score in each decoding score sequence, selecting the decoding score sequence with the highest maximum decoding score value to obtain the decoding score sequence that meets the preset conditions, and using the fill light whose decoding score sequence meets the preset conditions as the target fill light; alternatively, calculating the average decoding score corresponding to each decoding score sequence, selecting the decoding score sequence with the highest average decoding score value to obtain the decoding score sequence that meets the preset conditions, and using the fill light whose decoding score sequence meets the preset conditions as the target fill light; alternatively, obtaining a preset score threshold, respectively counting the number of decoding scores greater than the preset score threshold in each decoding score sequence, and using the decoding score sequence with the largest number as the decoding score sequence that meets the preset conditions, and using the fill light whose decoding score sequence meets the preset conditions as the target fill light.

[0122] The specific method for determining whether the decoding score sequence meets the preset conditions can be flexibly set according to the actual application scenario, and the present application does not limit this.

[0123] Then, determine the candidate brightness values corresponding to the decoding scores that meet the preset conditions in the decoding score sequence corresponding to the target fill light to obtain the target brightness value.

[0124] In some embodiments, the candidate brightness value corresponding to the maximum decoding score in the decoding score sequence corresponding to the target fill light can be directly used as the target brightness value; it is also possible to sort the candidate brightness values in ascending order, and then calculate the range of candidate brightness values with the best decoding score performance, and select the target brightness value from the range of candidate brightness values with the best decoding score performance.

[0125] For example, obtain a preset number of adjacent candidate brightness values to obtain multiple brightness combinations; obtain the decoding scores calculated for the candidate brightness values included in the brightness combination in the decoding score sequence corresponding to the target fill light, sum the decoding scores corresponding to each candidate brightness value in the brightness combination to obtain the comprehensive score corresponding to the brightness combination; obtain the target brightness value based on the brightness combination with the highest comprehensive score.

[0126] Illustratively, after obtaining the brightness combination with the highest comprehensive score, the middle value of the brightness combination can be selected as the target brightness value; the average brightness value of the brightness combination can also be calculated as the target brightness value; it is also possible to select the candidate brightness value with the highest decoding score in the brightness combination, and the present application does not limit this.

[0127] Based on the image acquisition parameters corresponding to the target fill light and the target brightness value determined in the above embodiments, obtain the target code reading parameters.

[0128] The method for automatically adjusting the parameters of the barcode reader provided by this application obtains a candidate brightness range, selects brightness values within the candidate brightness range to obtain multiple candidate brightness values, adjusts image acquisition parameters under each type of fill light based on the multiple candidate brightness values to collect barcode images, obtains candidate barcode image sequences collected by each type of fill light for different candidate brightness values, decodes each candidate barcode image, and calculates the decoding scores of each candidate barcode image respectively to obtain decoding score sequences of each type of fill light at different candidate brightness values, determines the fill light whose decoding score sequence meets the preset conditions to obtain the target fill light, and determines the candidate brightness value corresponding to the decoding score that meets the preset conditions in the decoding score sequence corresponding to the target fill light to obtain the target brightness value. Using the image acquisition parameters corresponding to the target fill light and the target brightness value as the target barcode reading parameters can achieve the automatic adjustment of the barcode reader parameters under multiple types of fill lights, quickly and accurately find the optimal barcode reader parameters, improve the deployment and debugging efficiency of the barcode reader, and, through the barcode search strategy with brightness as the independent variable, can effectively avoid the slow search speed caused by the weak change in the brightness of the exposure and gain images when the image is overexposed or underexposed with a fixed step size.

[0129] Figure 5 It is a block diagram of the device for automatically adjusting the parameters of the barcode reader shown in an exemplary embodiment of this application. As Figure 5 shown, the exemplary device 500 for automatically adjusting the parameters of the barcode reader includes:

[0130] A candidate brightness acquisition module 510, configured to obtain a candidate brightness range, select brightness values within the candidate brightness range to obtain multiple candidate brightness values;

[0131] An image acquisition module 520, configured to adjust image acquisition parameters under each type of fill light based on the multiple candidate brightness values to collect barcode images, and obtain candidate barcode image sequences collected by each type of fill light for different candidate brightness values; wherein, the difference between the image brightness value of the candidate barcode image in the candidate barcode image sequence and the corresponding candidate brightness value is less than a preset threshold, and the image acquisition parameters include exposure and / or gain;

[0132] A decoding score calculation module 530, configured to decode each candidate barcode image and calculate the decoding scores of each candidate barcode image respectively to obtain decoding score sequences of each type of fill light at different candidate brightness values; wherein, the decoding score is used to measure the difficulty of decoding the candidate barcode image.

[0133] The fill light and brightness value selection module 540 is configured to determine a fill light whose decoding score sequence meets a preset condition, obtain a target fill light, and determine candidate brightness values corresponding to the decoding scores that meet the preset condition in the decoding score sequence corresponding to the target fill light, so as to obtain a target brightness value;

[0134] The code reading parameter determination module 550 is configured to use the image acquisition parameters corresponding to the target fill light and the target brightness value as target code reading parameters.

[0135] It should be noted that the parameter automatic adjustment device of the code reader provided in the above embodiment and the parameter automatic adjustment method of the code reader provided in the above embodiment belong to the same concept. The specific manners in which each module and unit perform operations have been described in detail in the method embodiment, and will not be elaborated here. In practical applications, the parameter automatic adjustment device of the code reader provided in the above embodiment may, according to needs, allocate the above functions to different functional modules, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited herein.

[0136] Please refer to Figure 6 , Figure 6 FIG. is a schematic structural diagram of an embodiment of an electronic device according to the present application. The electronic device 600 includes a memory 601 and a processor 602. The processor 602 is configured to execute program instructions stored in the memory 601 to implement the steps in any of the above method embodiments of the parameter automatic adjustment method of the code reader. In a specific implementation scenario, the electronic device 600 may include, but is not limited to, a microcomputer, a server. In addition, the electronic device 600 may also include mobile devices such as a laptop computer, a tablet computer, etc., which are not limited herein.

[0137] Specifically, the processor 602 is used to control itself and the memory 601 to implement the steps in any of the above-described embodiments of the method for automatically adjusting the parameters of the barcode reader. The processor 602 may also be referred to as a Central Processing Unit (CPU). The processor 602 may be an integrated circuit chip with the ability to process signals. The processor 602 may also be a general-purpose processor, 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, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Additionally, the processor 602 may be implemented jointly by integrated circuit chips.

[0138] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. The computer-readable storage medium 700 stores program instructions 710 that can be run by a processor, and the program instructions 710 are used to implement the steps in any of the above-described embodiments of the method for automatically adjusting the parameters of the barcode reader.

[0139] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be elaborated here.

[0140] The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to each other. For the sake of brevity, they will not be elaborated in this article.

[0141] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the above-described device embodiments are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.

[0142] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods of each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

Claims

1. A method for automatically adjusting parameters of a barcode reader, characterized in that, The reader is deployed with various types of fill lights, and the method includes: Obtain a candidate brightness range, select brightness values within the candidate brightness range to obtain a plurality of candidate brightness values; Based on the plurality of candidate brightness values, adjust image acquisition parameters under each type of fill light to collect barcode images, and obtain candidate barcode image sequences respectively collected by each type of fill light for different candidate brightness values; wherein, the difference between the image brightness value of the candidate barcode image in the candidate barcode image sequence and the corresponding candidate brightness value is less than a preset threshold, and the image acquisition parameters include exposure and / or gain; Decode each candidate barcode image, and calculate the decoding scores of each candidate barcode image respectively to obtain decoding score sequences of each type of fill light at different candidate brightness values; wherein, the decoding score is used to measure the difficulty of decoding the candidate barcode image; Determine the fill light whose decoding score sequence meets the preset conditions to obtain a target fill light, and determine the candidate brightness value corresponding to the decoding score that meets the preset conditions in the decoding score sequence corresponding to the target fill light to obtain a target brightness value; Use the image acquisition parameters corresponding to the target fill light and the target brightness value as target barcode reading parameters.

2. The method according to claim 1, wherein The obtaining of the candidate brightness range includes: Obtain an initial brightness range, select brightness values within the initial brightness range to obtain a plurality of initial brightness values; Based on the initial brightness values, adjust image acquisition parameters to collect barcode images, and obtain initial barcode images collected for the initial brightness values; wherein, the difference between the image brightness value of the initial barcode image and the initial brightness value is less than the preset threshold; Decode the initial barcode image, and in response to successful decoding of the initial barcode image, divide the candidate brightness range based on the initial brightness value corresponding to the successfully decoded initial barcode image.

3. The method according to claim 2, wherein Different types of fill lights correspond to different initial brightness ranges; the obtaining of the initial brightness range includes: For any type of fill light, obtain the maximum exposure, minimum exposure, maximum gain, and minimum gain of the fill light; Collect barcode images under the fill light based on the maximum exposure and maximum gain to obtain a first barcode image, and collect barcode images under the fill light based on the minimum exposure and minimum gain to obtain a second barcode image; Calculate the image brightness value corresponding to the first barcode image to obtain a maximum brightness value, and calculate the image brightness value corresponding to the second barcode image to obtain a minimum brightness value; Obtain the initial brightness range corresponding to the fill light based on the minimum brightness value and the maximum brightness value.

4. The method according to claim 2, wherein The selecting of brightness values within the initial brightness range to obtain a plurality of initial brightness values includes: Select brightness values within the initial brightness range using different brightness steps to obtain the initial brightness values corresponding to the different brightness steps; The adjusting of image acquisition parameters based on the initial brightness values to collect barcode images, and obtaining initial barcode images collected for the initial brightness values includes: Descendingly sort the initial brightness values corresponding to the different brightness steps according to the magnitude of the brightness step to obtain a sequence of initial brightness values to be traversed; Traverse the initial brightness values in the sequence of initial brightness values in turn, and adjust the image acquisition parameters based on the currently traversed initial brightness value to acquire a bar code image, so as to obtain an initial bar code image acquired for the currently traversed initial brightness value.

5. The method according to claim 2, characterized in that, The dividing the candidate brightness range based on the initial brightness value corresponding to the successfully decoded initial bar code image includes: Calculate the decoding score of the initial bar code image, and calculate the range size of the candidate brightness range to be divided based on the decoding score of the initial bar code image; wherein, the decoding score of the initial bar code image is inversely proportional to the range size; Centering on the initial brightness value, divide the candidate brightness range according to the range size.

6. The method according to claim 1, wherein The determining the fill light whose decoding score sequence meets the preset conditions to obtain the target fill light includes: Statistically calculate the maximum decoding score in each decoding score sequence, select the decoding score sequence with the highest maximum decoding score value to obtain the decoding score sequence that meets the preset conditions, and use the fill light whose decoding score sequence meets the preset conditions as the target fill light; Alternatively, calculate the average decoding score corresponding to each decoding score sequence, select the decoding score sequence with the highest average decoding score value to obtain the decoding score sequence that meets the preset conditions, and use the fill light whose decoding score sequence meets the preset conditions as the target fill light; Alternatively, obtain a preset score threshold, respectively count the number of decoding scores greater than the preset score threshold in each decoding score sequence, and use the decoding score sequence with the largest number as the decoding score sequence that meets the preset conditions, and use the fill light whose decoding score sequence meets the preset conditions as the target fill light.

7. The method according to claim 1, characterized in that The determining the candidate brightness value corresponding to the decoding score that meets the preset conditions in the decoding score sequence corresponding to the target fill light to obtain the target brightness value includes: Obtain a preset number of adjacent candidate brightness values to obtain a plurality of brightness combinations; Obtain the decoding scores calculated for the candidate brightness values included in the brightness combination in the decoding score sequence corresponding to the target fill light, and perform a summation calculation on the decoding scores corresponding to the respective candidate brightness values in the brightness combination to obtain the comprehensive score corresponding to the brightness combination; Obtain the target brightness value based on the brightness combination with the highest comprehensive score.

8. The method according to claim 1, wherein The taking the image acquisition parameters corresponding to the target fill light and the target brightness value as the target code reading parameters includes: Obtain the bar code attribute information corresponding to the candidate bar code image, and obtain the decoding algorithm parameters corresponding to the decoding score that meets the preset conditions; Associate the bar code attribute information, the decoding algorithm parameters, and the image acquisition parameters corresponding to the target fill light and the target brightness value to obtain the target code reading parameters.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, and the processor is configured to execute program instructions stored in the memory to implement the steps in the method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that can be executed by a processor to implement the steps in the method according to any one of claims 1-8.

Citation Information

Cited By

  • Parameter adjustment method and device of code reader and storage medium

    CN121503510A