Brightness parameter debugging method and system in decoding scene

By using an automated brightness parameter tuning method, images under different lighting conditions are acquired and analyzed to determine the optimal brightness parameters. This solves the problem of low brightness parameter tuning efficiency in existing technologies and improves decoding success rate and system robustness.

CN120996059APending Publication Date: 2025-11-21NINGBO XINSHU TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510874362.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, brightness parameter adjustment relies on manual experience and lacks a systematic process, resulting in low adjustment efficiency and difficulty in standardization.

Method used

By acquiring test images under different brightness parameters, a test image set is generated, the target area and image statistical indicators are determined, the brightness parameters of the target frame are automatically determined, and decoding is performed.

Benefits of technology

It improves the efficiency of brightness parameter adjustment and decoding success rate, realizes fully automatic brightness calibration, adapts to complex lighting conditions, and enhances the system's robustness and industrial deployment capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996059A_ABST
    Figure CN120996059A_ABST
Patent Text Reader

Abstract

The invention relates to a brightness parameter debugging method in a decoding scene, and the method comprises the steps: obtaining test images of a target scene under different brightness parameters, generating a test image set, determining a target region and an image statistical index of the target region in each test image based on the test image set, the target area is an area where the to-be-identified code is most likely to exist, determining a target frame in the test image according to the obtained image statistical index, taking a brightness parameter of the target frame as a target brightness parameter, and obtaining the to-be-identified code image based on the target brightness parameter for decoding. According to the method and the device, the problem of low brightness parameter debugging efficiency in a decoding scene is solved, the image performance under different illumination conditions is calculated and quantified, the image is analyzed and subjected to automatic brightness calibration, the brightness parameter debugging efficiency is improved, the code image is acquired according to the optimal brightness parameter, the code area reaches the optimal recognizable state, and the decoding success rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of barcode reading technology, and in particular to a method and system for adjusting brightness parameters in decoding scenarios. Background Technology

[0002] One-dimensional and two-dimensional barcode technologies are widely used in logistics, payment, and identity recognition due to their advantages such as large information storage capacity, strong fault tolerance, and fast recognition speed. Algorithms that obtain high-quality images containing identification codes (including one-dimensional and two-dimensional barcodes) and perform appropriate preprocessing are crucial for ensuring efficient and accurate subsequent decoding. The brightness parameters of the acquired images directly affect the final decoding performance.

[0003] In existing technologies, brightness parameter tuning typically relies on manual experience or trial-and-error adjustments. The tuning effectiveness is highly dependent on the experience level of the technicians, lacks a systematic tuning framework, is highly random, and difficult to standardize, thus reducing tuning efficiency. Summary of the Invention

[0004] This application provides a method, system, electronic device, and storage medium for adjusting brightness parameters in a decoding scenario, in order to at least solve the problem of low efficiency in adjusting brightness parameters in decoding scenarios in related technologies.

[0005] In a first aspect, embodiments of this application provide a method for adjusting brightness parameters in a decoding scenario, the method comprising:

[0006] Acquire test images of the target scene under different brightness parameters, generate a test image set, and determine the target region and image statistical indicators of the target region in each test image based on the test image set. The test image includes a code to be identified, and the target region is the region where the code to be identified is most likely to exist.

[0007] The target frame is determined in the test image based on the obtained image statistical indicators;

[0008] The brightness parameters of the target frame are used as target brightness parameters, and the image of the code to be identified is obtained and decoded based on the target brightness parameters.

[0009] In some embodiments, determining the target region and image statistical indicators of the target region in each of the test images based on the test image set includes:

[0010] Iterate through the candidate brightness parameters, obtain the test images under different brightness parameters, and use all the test images as a test image set;

[0011] The target region is determined based on the test image set, and image statistical indicators are obtained for the target region within each frame of the test image set.

[0012] In some embodiments, determining the target region and image statistical indicators of the target region in each of the test images based on the test image set includes:

[0013] Acquire test images of the target scene under the current brightness parameters, and use the acquired test images and the current test image as the test image set;

[0014] The target region is determined based on the test image set, and image statistical indicators are obtained for the target region within the current test image.

[0015] In some embodiments, determining the target frame in the test image based on acquired image statistical indicators includes:

[0016] Determine if the selection of brightness parameters has been completely iterated.

[0017] If so, the test image with the best image statistical indicators is taken as the target frame.

[0018] If not, continue to obtain the test image and image statistics of the target scene under the next brightness parameter.

[0019] In some embodiments, determining the target region based on the test image set includes:

[0020] Within each test image in the test image set, the potential region of the code to be identified is determined, and the image information of the potential region is statistically analyzed to obtain the confidence level of the statistical results.

[0021] The potential region with the highest confidence in each test image is selected as the candidate region, and the target region is determined based on the candidate region.

[0022] In some embodiments, the acquired image statistical metrics include:

[0023] The target region within the test image is analyzed to obtain the inter-class variance, average brightness, and foreground / background peak noise.

[0024] The inter-class variances are normalized to obtain the first statistical index;

[0025] The difference between the average brightness and the preset target brightness is normalized to obtain the second statistical index;

[0026] The image statistical index is obtained by weighting the first statistical index, the second statistical index, and the foreground and background peak noise.

[0027] In some embodiments, acquiring test images of the target scene under different brightness parameters includes:

[0028] A brightness parameter lookup table is constructed based on exposure time, gain, and light source type;

[0029] The brightness parameter lookup table is traversed to obtain test images of the target scene under different exposure times, gains, and light source types.

[0030] Secondly, embodiments of this application provide a brightness parameter adjustment system for decoding scenarios, the system comprising:

[0031] The analysis module is used to acquire test images of the target scene under different brightness parameters, generate a test image set, and determine the target region and image statistical indicators of the target region in each test image based on the test image set. The test image includes a code to be identified, and the target region is the region where the code to be identified is most likely to exist.

[0032] The target frame determination module is used to determine the target frame in the test image based on the acquired image statistical indicators;

[0033] The parameter determination module is used to use the brightness parameter of the target frame as the target brightness parameter, and to obtain the image of the code to be identified based on the target brightness parameter for decoding.

[0034] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the brightness parameter adjustment method for the decoding scenario described in the first aspect above.

[0035] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the brightness parameter adjustment method for the decoding scenario as described in the first aspect above; or a computer-readable storage medium storing a HEX / BIT project file thereon, which, when executed by a field-programmable gate array, implements the brightness parameter adjustment method for the decoding scenario as described in the first aspect above.

[0036] Compared to related technologies, the brightness parameter debugging method for decoding scenarios provided in this application embodiment obtains test images by traversing brightness parameters, calculates and quantifies image performance under different lighting conditions, and automatically calibrates the brightness of the test images. This solves the problem of low efficiency in brightness parameter debugging in decoding scenarios. Furthermore, it obtains code images based on optimal brightness parameters, so that the code area reaches the best recognizable state, thereby improving the decoding success rate. Attached Figure Description

[0037] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0038] Figure 1 This is a flowchart of a brightness parameter adjustment method in a decoding scenario according to an embodiment of this application;

[0039] Figure 2 This is a flowchart of a brightness parameter determination method according to an embodiment of this application;

[0040] Figure 3 This is a flowchart of another method for determining brightness parameters according to an embodiment of this application;

[0041] Figure 4 This is a schematic diagram of a potential region for a code to be identified according to an embodiment of this application;

[0042] Figure 5 This is a structural block diagram of a brightness parameter adjustment system in a decoding scenario according to an embodiment of this application;

[0043] Figure 6 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0045] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0046] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0047] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0048] This embodiment provides a method for adjusting brightness parameters in a decoding scenario. Figure 1 This is a flowchart of a brightness parameter adjustment method in a decoding scenario according to an embodiment of this application, as shown below. Figure 1 As shown, the process includes the following steps:

[0049] Step S101: Obtain test images of the target scene under different brightness parameters, generate a test image set, and determine the target area and image statistical indicators of the target area in each test image based on the test image set. The test images include the code to be identified, and the target area is the area where the code to be identified is most likely to exist.

[0050] In this embodiment, the code to be identified includes a one-dimensional barcode and a two-dimensional barcode. Test images of the code to be identified are obtained by taking pictures under different brightness parameters. The brightness parameters of each test image are scored, and the optimal brightness parameter is determined based on the scoring results as the target brightness parameter.

[0051] In some embodiments, obtaining test images of the target scene under different brightness parameters includes: constructing a brightness parameter lookup table based on exposure time, gain, and light source type, traversing the brightness parameter lookup table, and obtaining test images of the target scene under different exposure times, gains, and light source types.

[0052] Brightness parameters include, but are not limited to, exposure time, gain, and light source type. Light source type includes combinations of different light forms, such as visible / invisible light, blue / red / white light, and uniform / polarized / direct light. Brightness parameters are adjusted by controlling external devices, which include, but are not limited to, image sensors and flash units.

[0053] Optionally, a brightness parameter lookup table is constructed based on the selected brightness parameters. By controlling variables, the brightness parameter lookup table is traversed, and the code to be identified is captured under different exposure times, gains, or light source types to obtain a test image.

[0054] Step S102: Determine the target frame in the test image based on the acquired image statistical indicators.

[0055] By using image statistical indicators to quantify features, the image with the best image quality in the target region (i.e., the region where the code to be identified is most likely to exist) is found and used as the target frame.

[0056] Step S103: Use the brightness parameters of the target frame as the target brightness parameters, and obtain the image of the code to be identified based on the target brightness parameters for decoding.

[0057] By acquiring the image to be decoded under the brightness parameters of the target frame, the efficiency and accuracy of subsequent decoding are significantly improved. It should be noted that the image to be identified can be the direct target image, in which case the purpose of decoding is to obtain the valid information encoded in the image; the image to be identified can also be used as an image for parameter debugging, in which case the purpose of decoding is to test, optimize, or calibrate the parameters and performance of the decoding algorithm.

[0058] Through the above steps, test images are obtained by traversing brightness parameters, and the image performance under different lighting conditions is calculated and quantified. The target area in the test image is analyzed to determine the optimal brightness parameters. Fully automatic brightness calibration solves the problem of low efficiency in brightness parameter debugging in decoding scenarios. Furthermore, the code image is obtained based on the optimal brightness parameters so that the code area reaches the best recognizable state, thereby improving the decoding success rate.

[0059] In this embodiment of the application, step S101 provides two optional methods.

[0060] As an optional approach, all test images are obtained by first traversing the brightness parameters, and then statistical evaluation is performed to obtain the target frame. Specifically, step S101 includes:

[0061] Step S1011: Traverse the candidate brightness parameters, obtain test images under different brightness parameters, and use all test images as a test image set.

[0062] Step S1012: Determine the target region based on the test image set, and obtain image statistical indicators for the target region within each frame of the test image set.

[0063] In this optional method, after capturing images of the code to be identified based on all candidate brightness parameters, the captured test images are analyzed to obtain image statistical indicators for all test images. It should be noted that in this embodiment, the target area is the region where the code to be identified is most likely to exist. Figure 2 This is a flowchart of a brightness parameter determination method according to an embodiment of this application, such as... Figure 2 As shown, this process can be implemented in the following ways:

[0064] Step S201: Read the brightness parameter table. Step S202: Traverse the brightness parameter table and capture images of the code to be identified. In step S202, the brightness parameter table is traversed first to obtain test images. Step S203: After traversing all brightness parameters in the brightness parameter table, obtain the image statistical index for each captured image. Step S204: Select the brightness parameter corresponding to the image with the best image statistical index as the target brightness parameter.

[0065] In this way, after traversing all brightness parameters, the target area only needs to be determined once.

[0066] As an alternative approach, while traversing the brightness parameters to acquire test images, a statistical evaluation is performed on each acquired test image to obtain the target frame. Specifically, step S101 includes:

[0067] Step S1013: Obtain a test image of the target scene under the current brightness parameters, and use the obtained test image and the current test image as a test image set.

[0068] Step S1014: Determine the target region based on the test image set, and obtain image statistical indicators within the target region in the current test image.

[0069] It should be noted that the acquired test images refer to all images captured before this image capture. For example, if the current brightness parameter is the 10th set of brightness parameters encountered, then the acquired test images are those captured under the previous 9 sets of brightness parameters. The process involves capturing images of the code to be identified by iterating through the candidate brightness parameters, analyzing the captured images to obtain the image statistical indicators, and finally, after iterating through all candidate brightness parameters, selecting the image with the best image statistical indicators as the target frame. Figure 3 This is a flowchart of another method for determining brightness parameters according to an embodiment of this application, such as... Figure 3 As shown, this process can be implemented in the following ways:

[0070] Step S301: Read the brightness parameter table. Step S302: Traverse the brightness parameter table, capture the image to be identified based on the current brightness parameters, and obtain the image statistical indicators of the currently captured image. After acquiring each test image in Step S302, analyze the test image first. Step S303: After traversing all brightness parameters in the brightness parameter table, select the brightness parameter corresponding to the image with the best image statistical indicators as the target brightness parameter.

[0071] In this optional method, determining the target frame in the test image based on the acquired image statistical indicators includes: determining whether the candidate brightness parameters have been traversed; if so, taking the test image with the best image statistical indicators as the target frame; otherwise, continuing to acquire the test image and image statistical indicators of the target scene under the next brightness parameter.

[0072] After each image statistical index analysis, it is determined whether the brightness parameter has been traversed. If the traversal is complete, the image with the best image statistical index is selected from all test images as the target frame. If the traversal is not complete, the traversal continues.

[0073] In this way, image statistical index analysis is performed after each test image is acquired. As the number of analyses increases, the accuracy of the analysis results will become higher and higher.

[0074] In both implementation methods described above, steps S1012 and S1014 employ the same target region determination method. Specifically, determining the target region includes:

[0075] Step S401: In each test image in the test image set, determine the potential region of the code to be identified, perform statistical analysis on the image information of the potential region, and obtain the confidence level of the statistical results.

[0076] Optionally, the potential regions where the code to be identified may exist in the image can be analyzed by an algorithm model. The algorithm model includes, but is not limited to, object detection networks such as YOLO SSD or fully convolutional neural networks such as Unet heatmap localization (FCN).

[0077] For a potential region, a trained CNN network is used to obtain the image statistical information of the potential region. The statistical image features include, but are not limited to, gray-level histogram, foreground peak and background peak, and the overall confidence of all features is obtained.

[0078] Step S402: Select the potential region with the highest confidence in each test image as the candidate region, and determine the target region based on the candidate region.

[0079] Based on the confidence level, a candidate region for the code to be identified is determined in each test image. The number of images with the same candidate region is counted, and the candidate region with the most identical images is taken as the region where the code to be identified is most likely to exist, i.e., the target region (denoted as X). Figure 4 This is a schematic diagram of a potential region for a code to be identified according to an embodiment of this application, such as... Figure 4 As shown in the figure, there are 4 test images. The small boxes in each test image are the potential regions of the code to be identified. Among them, the red boxes are the candidate regions with the highest confidence in each image. As can be seen from the figure, the candidate regions of the first and third frames are the same, while the others are different. Therefore, the candidate regions corresponding to the first and third frames are taken as the target regions X where the code to be identified is most likely to exist. The image statistical index at position X (the position of the dashed box) of each image is calculated, and the test image with the best image statistical index is taken as the target frame.

[0080] It should be noted that in step S1012, image analysis is performed after all test images have been captured, so the target area only needs to be determined once, and this target area is obtained based on the analysis of all test images; while in step S1014, after each test image is captured, the captured test image and all previously captured test images are analyzed, and the target area needs to be re-determined each time the analysis is performed. Here, the target area is obtained based on the captured image and all test images collected before the captured image.

[0081] In both implementation methods described above, steps S1012 and S1014 employ the same method for determining image statistical indicators. Specifically, determining the image statistical indicators includes:

[0082] Step S501: Analyze the target region within the test image to obtain the inter-class variance, average brightness, and foreground / background peak noise.

[0083] Step S502: Normalize the inter-class variance to obtain the first statistical index.

[0084] Step S503: Normalize the difference between the average brightness and the preset target brightness to obtain the second statistical index.

[0085] Step S504: Obtain the image statistical index based on the weighted sum of the first statistical index, the second statistical index, and the interpeak noise between the foreground and background.

[0086] In this embodiment, the statistical indicators include, but are not limited to, inter-class variance, average brightness, and foreground / background peak noise. The various indicator data are processed; optionally, the inter-class variance is normalized to the 0-1 range, and the difference between the average brightness and the target brightness is normalized to the 0-1 range. The processed indicators are then weighted and summed to obtain a statistical score for each test image, and the test image with the highest score is selected as the target frame.

[0087] Through the above steps, test images are obtained by traversing brightness parameters, and the image performance under different lighting conditions is calculated and quantified. The target area in the test image is analyzed to determine the optimal brightness parameters. The traversal process can be executed in batches in a programmed manner. The optimal parameters are automatically determined by quantitative indicators (such as decoding confidence and boundary sharpness), which improves the efficiency of brightness parameter debugging. The code image is obtained based on the optimal brightness parameters, so that the code area reaches the best recognizable state and improves the decoding success rate.

[0088] Brightness parameter traversal optimization improves the system's robustness in handling complex scenarios and its ability for industrial deployment by dynamically adapting to the lighting environment and automating the preprocessing process.

[0089] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0090] This embodiment also provides a brightness parameter adjustment system for a decoding scenario. This system is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0091] Figure 5 This is a structural block diagram of a brightness parameter adjustment system in a decoding scenario according to an embodiment of this application, as shown below. Figure 5 As shown, the system includes:

[0092] Analysis module 61 is used to acquire test images of the target scene under different brightness parameters, generate a test image set, and determine the target area and image statistical indicators of the target area in each test image based on the test image set. The test images include the code to be identified, and the target area is the area where the code to be identified is most likely to exist.

[0093] The target frame determination module 62 is used to determine the target frame in the test image based on the acquired image statistical indicators.

[0094] The parameter determination module 63 is used to use the brightness parameters of the target frame as the target brightness parameters, and to obtain the image of the code to be identified and decode it based on the target brightness parameters.

[0095] In some embodiments, the analysis module 61 includes:

[0096] The first image acquisition module is used to traverse the candidate brightness parameters, acquire test images under different brightness parameters, and use all test images as a test image set.

[0097] The first indicator calculation module is used to determine the target region based on the test image set and obtain image statistical indicators for the target region within each frame of the test image set.

[0098] In some embodiments, the analysis module 61 includes:

[0099] The second image acquisition module is used to acquire test images of the target scene under the current brightness parameters, and uses the acquired test images and the current test image as a test image set.

[0100] The second indicator calculation module is used to determine the target region based on the test image set and obtain image statistical indicators within the target region in the current test image.

[0101] In some embodiments, the target frame determination module 62 includes a judgment module, used to determine whether the candidate brightness parameters have been traversed. If so, the test image with the best image statistical index is taken as the target frame. If not, the test image and image statistical index of the target scene under the next brightness parameter are obtained.

[0102] In some embodiments, the first indicator calculation module and the second indicator calculation module include:

[0103] The recognition module is used to determine the potential region of the code to be recognized in each test image in the test image set, perform statistical analysis on the image information of the potential region, and obtain the confidence level of the statistical results.

[0104] The region determination module is used to select the potential region with the highest confidence in each test image as the candidate region, and determine the target region based on the candidate region.

[0105] In some embodiments, the first indicator calculation module and the second indicator calculation module include:

[0106] The statistical analysis module is used to analyze the target region within the test image to obtain inter-class variance, average brightness, and foreground / background peak noise.

[0107] The first indicator determination module is used to normalize the inter-class variance to obtain the first statistical indicator.

[0108] The second indicator determination module is used to normalize the difference between the average brightness and the preset target brightness to obtain the second statistical indicator.

[0109] The weighting module is used to obtain image statistical indicators based on the weighted sum of the first statistical indicator, the second statistical indicator, and the foreground and background interpeak noise.

[0110] In some embodiments, the analysis module 61 includes:

[0111] The brightness table construction module is used to build a brightness parameter lookup table based on exposure time, gain, and light source type.

[0112] The traversal module is used to traverse the brightness parameter lookup table to obtain test images of the target scene under different exposure times, gains, and light source types.

[0113] Secondly, embodiments of this application provide a brightness parameter adjustment system for decoding scenarios, the system comprising:

[0114] The analysis module is used to acquire test images of the target scene under different brightness parameters, generate a test image set, and determine the target area and image statistical indicators of the target area in each test image based on the test image set. The test images include the code to be identified, and the target area is the area where the code to be identified is most likely to exist.

[0115] The target frame determination module is used to determine the target frame in the test image based on the acquired image statistical indicators;

[0116] The parameter determination module is used to take the brightness parameters of the target frame as the target brightness parameters, and to obtain the image of the code to be identified and decode it based on the target brightness parameters.

[0117] The system described above traverses brightness parameters to obtain test images, calculates and quantifies image performance under different lighting conditions, analyzes the target area in the test image to determine the optimal brightness parameters, and the traversal process can be executed in batches in a programmed manner. The optimal parameters are automatically determined through quantitative indicators (such as decoding confidence and boundary sharpness), which improves the efficiency of brightness parameter debugging. Based on the optimal brightness parameters, the code image is obtained so that the code area reaches the best recognizable state, thereby improving the decoding success rate.

[0118] Brightness parameter traversal optimization improves the system's robustness in handling complex scenarios and its ability for industrial deployment by dynamically adapting to the lighting environment and automating the preprocessing process.

[0119] It should be noted that the above modules can be either functional modules or program modules, and can be implemented in software or hardware. For modules implemented in hardware, the above modules can be located in the same circuit structure; or the above modules can be located in different circuit structures in any combination. The circuit structure can be a processor, a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC).

[0120] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0121] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0122] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0123] S1. Acquire test images of the target scene under different brightness parameters, generate a test image set, and determine the target area and image statistical indicators of the target area in each test image based on the test image set. The test images include the code to be identified, and the target area is the area where the code to be identified is most likely to exist.

[0124] S2, determine the target frame in the test image based on the obtained image statistical indicators.

[0125] S3, use the brightness parameters of the target frame as the target brightness parameters, and obtain the image of the code to be identified based on the target brightness parameters for decoding.

[0126] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0127] In one embodiment, Figure 6 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application, such as... Figure 6 As shown, an electronic device is provided, which can be a server, and its internal structure diagram can be as follows. Figure 6As shown, this electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a brightness parameter adjustment method for a decoding scenario.

[0128] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0129] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0130] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by instructing related hardware through a HEX / BIT project file. The HEX / BIT project file can be stored in a field-programmable gate array (FPGA). When the HEX / BIT project file is executed by the FPGA, it can include the processes of the embodiments of the above methods.

[0131] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0132] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for adjusting brightness parameters in a decoding scenario, characterized in that, The method includes: Acquire test images of the target scene under different brightness parameters, generate a test image set, and determine the target region and image statistical indicators of the target region in each test image based on the test image set. The test image includes a code to be identified, and the target region is the region where the code to be identified is most likely to exist. The target frame is determined in the test image based on the obtained image statistical indicators; The brightness parameters of the target frame are used as target brightness parameters, and the image of the code to be identified is obtained and decoded based on the target brightness parameters.

2. The method according to claim 1, characterized in that, The image statistical indicators for determining the target region based on the test image set and the target region in each of the test images include: Iterate through the candidate brightness parameters, obtain the test images under different brightness parameters, and use all the test images as a test image set; The target region is determined based on the test image set, and image statistical indicators are obtained for the target region within each frame of the test image set.

3. The method according to claim 1, characterized in that, The image statistical indicators for determining the target region based on the test image set and the target region in each of the test images include: Acquire test images of the target scene under the current brightness parameters, and use the acquired test images and the current test image as the test image set; The target region is determined based on the test image set, and image statistical indicators are obtained for the target region within the current test image.

4. The method according to claim 3, characterized in that, The step of determining the target frame in the test image based on the acquired image statistical indicators includes: Determine if the selection of brightness parameters has been completely iterated. If so, the test image with the best image statistical indicators is taken as the target frame. If not, continue to obtain the test image and image statistics of the target scene under the next brightness parameter.

5. The method according to claim 2 or 3, characterized in that, Determining the target region based on the test image set includes: Within each test image in the test image set, the potential region of the code to be identified is determined, and the image information of the potential region is statistically analyzed to obtain the confidence level of the statistical results. The potential region with the highest confidence in each test image is selected as the candidate region, and the target region is determined based on the candidate region.

6. The method according to claim 2 or 3, characterized in that, The acquired image statistical indicators include: The target region within the test image is analyzed to obtain the inter-class variance, average brightness, and foreground / background peak noise. The inter-class variances are normalized to obtain the first statistical index; The difference between the average brightness and the preset target brightness is normalized to obtain the second statistical index; The image statistical index is obtained by weighting the first statistical index, the second statistical index, and the foreground and background peak noise.

7. The method according to claim 1, characterized in that, The acquisition of test images of the target scene under different brightness parameters includes: A brightness parameter lookup table is constructed based on exposure time, gain, and light source type; The brightness parameter lookup table is traversed to obtain test images of the target scene under different exposure times, gains, and light source types.

8. A brightness parameter adjustment system for a decoding scenario, characterized in that, The system includes: The analysis module is used to acquire test images of the target scene under different brightness parameters, generate a test image set, and determine the target region and image statistical indicators of the target region in each test image based on the test image set. The test image includes a code to be identified, and the target region is the region where the code to be identified is most likely to exist. The target frame determination module is used to determine the target frame in the test image based on the acquired image statistical indicators; The parameter determination module is used to use the brightness parameter of the target frame as the target brightness parameter, and to obtain the image of the code to be identified based on the target brightness parameter for decoding.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the brightness parameter adjustment method for the decoding scenario as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the brightness parameter adjustment method for the decoding scenario as described in any one of claims 1 to 7; or it stores a HEX / BIT project file that, when executed by a field-programmable gate array, implements the brightness parameter adjustment method for the decoding scenario as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent imaging optical parameter self-adjusting method

    CN114143473A

  • Terminal device and method for creating / displaying HDR image

    CN116095503A

  • Image recognition method and system, electronic equipment and storage medium

    CN116645527A

  • Two-dimensional code identification method and device

    CN119785277A