A two-dimensional code scanner fast decoding system based on image recognition

CN122655815APending Publication Date: 2026-08-28GUANGDONG YUECHUANG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610576673.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-28
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0003]现有全域静态处理范式会在高清成像场景下因冗余背景像素运算造成处理器资源耗散、解码时延升高,同时忽视帧间时空关联性而产生大量无效计算重叠,且无法平衡识别精度与处理速度,难以抵御复杂环境干扰,导致扫描系统在工业工况下的实时性与鲁棒性均无法满足使用需求

Benefits of technology

1.本发明所述的一种基于图像识别的二维码扫描器快速解码系统,通过特征检测模块与区域提取模块的空间协同,本发明彻底打破了传统二维码扫描识别系统对全域图像执行无差别计算的瓶颈,通过在低分辨率代理空间寻址、在局部高分辨率空间解码的两级架构,实现在超高清成像背景下大幅度剥离冗余计算量,实验数据表明,在千万像素级的图像传感器配置下,本发明能够将单一解码周期的处理器指令执行次数降低百分之八十以上,从物理层面抑制了扫描设备的温升速度,并延长了移动端设备的续航时间,

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122655815A_ABST
    Figure CN122655815A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of automatic identification, and particularly relates to a two-dimensional code scanner fast decoding system based on image recognition, which comprises an image acquisition module, a saliency feature detection module, a dynamic target region of interest extraction module, a space-time correlation tracking module and a local fast decoding module. The saliency detection is used to lock the candidate region in a low-resolution space, the extraction module is used to define a local pixel subset, and the tracking module is used to perform trajectory prediction to shield the global blind search logic. The two-dimensional code scanner fast decoding system can reduce the calculation load and power consumption, shorten the dynamic capture locking time, and effectively improve the decoding robustness and data throughput under complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automatic identification technology, specifically a fast decoding system for QR code scanners based on image recognition. Background Technology

[0002] Against the backdrop of global digital transformation and the high integration of industrial automation, optical coding recognition technology is widely used in core business scenarios such as supply chain management and smart logistics. QR code scanners need to achieve extremely fast and accurate decoding in highly dynamic and high-throughput industrial processes. The popularization of high-definition and ultra-high-definition image sensors has improved the accuracy of capturing subtle features, but the algorithm architecture has not achieved a paradigm shift, making the contradiction between data acquisition accuracy and data processing efficiency increasingly prominent. Existing QR code scanning and recognition systems generally adopt a static processing paradigm based on global search. This approach performs indiscriminate global preprocessing on each frame captured by the image sensor and searches for QR code positioning patterns across the entire image using template matching or geometric feature retrieval. This method has a certain response speed in early low-resolution sensor scenarios.

[0003] Existing global static processing paradigms can lead to processor resource consumption and increased decoding latency in high-definition imaging scenarios due to redundant background pixel calculations. They also ignore the spatiotemporal correlation between frames, resulting in a large amount of invalid calculation overlap. Furthermore, they cannot balance recognition accuracy and processing speed, and are difficult to resist interference from complex environments. Consequently, the real-time performance and robustness of the scanning system in industrial conditions cannot meet the usage requirements.

[0004] Therefore, the present invention provides a fast decoding system for QR code scanners based on image recognition. Summary of the Invention

[0005] In order to overcome the shortcomings of the prior art, at least one technical problem raised in the background art is solved.

[0006] The technical solution adopted by this invention to solve its technical problem is: a fast decoding system for a QR code scanner based on image recognition, the fast decoding system comprising: The image acquisition module is used to continuously capture the raw pixel stream of the measured space using an optical sensor array; The feature detection module is used to construct a proxy mapping table in the global image space by executing a downsampling algorithm, and to lock the candidate region coordinates of the QR code target according to geometric topological constraints; The region extraction module is used to define a local subset of pixels containing the QR code body in the physical address space corresponding to the original pixel stream based on the coordinates of the candidate region, thereby forming a target region of interest. The spatiotemporal correlation tracking module is used to store historical decoding state components and calculate the expected spatial probability distribution of the QR code target in the current frame based on the inter-frame sampling interval and displacement increment. The localized fast decoding module is used to perform adaptive binarization, perspective transformation correction, and Reed-Solomon error correction on the local pixel subset and output the decoding result. In the case of continuous scanning, the expected spatial probability distribution generated by the spatiotemporal correlation tracking module is used to guide the region extraction module to perform window positioning, so as to selectively shield the global search logic of the feature detection module.

[0007] Preferably, the image acquisition module includes a complementary metal-oxide-semiconductor image sensor or a charge-coupled device image sensor; The image acquisition module integrates a timing control operator, which has pulse modulation logic and is used to couple with the execution logic of the external illumination synchronization trigger to ensure that the integration period of the sensor pixel array is completely synchronized with the supplementary light pulse of the external light source. The image acquisition module pushes the acquired raw image data to a dual-port static random access memory (SRAM) for logical mapping using direct memory access technology. The dual-port SRAM is configured to allow the image acquisition module to write the current frame while supporting the feature detection module to perform parallel addressing access to historical pixel rows. The image acquisition module is configured to acquire the raw pixel stream of the measured space in real time and continuously through a complementary metal-oxide-semiconductor image sensor or a charge-coupled device image sensor. The image acquisition module integrates a high-performance timing control operator, which is coupled with the external illumination synchronization trigger to ensure that the sensor pixel array can capture the original optical signal with controlled contrast within the exposure cycle of each frame. The original image data acquired by the image acquisition module is pushed in real time to a preset dual-port static random access memory for logical mapping, thereby providing a pixel addressing space with high bit width support for subsequent parallel processing units. The image acquisition module supports ultra-high resolution mode and can convert the optical features of far-end or small code bodies into digital components with high spatial sampling rate.

[0008] Preferably, the feature detection module internally deploys a downsampling operator and a geometric feature extraction operator; The downsampling operator uses mean filtering or bilinear interpolation algorithms to perform proportional compression on the full-resolution original pixel stream in order to construct the proxy mapping table with a multi-scale pyramid structure. The geometric feature extraction operator is configured to calculate the magnitude distribution of the image gradient vector in the proxy mapping table and extract the 1:1:3:1:1 proportional components according to the positioning pattern defined by the QR code standard to identify the central physical coordinates of the candidate region and preliminary size estimation parameters. The feature detection module is logically connected to the cache unit of the image acquisition module. The feature detection module is configured to perform low-entropy feature component filtering in the global image space. Specifically, the module does not perform intensive pixel-by-pixel grayscale operations, but generates a low-resolution proxy mapping table of the original image through a preset downsampling operator. The feature detection module has a geometric feature extraction operator deployed inside, which is configured to specifically search for specific proportional features that match the QR code positioning pattern. During execution, the geometric feature extraction operator quickly identifies candidate regions that conform to the 1:1:3:1:1 ratio by calculating the magnitude distribution of the image gradient vector. The output signal of the feature detection module includes the center coordinates of the candidate region and preliminary size estimation parameters. The mechanism is that by performing a preliminary search in the low-resolution proxy space, the computational load is compressed from the megapixel level to the 10,000-pixel level, thereby stripping away most of the background redundant information and achieving a primary acceleration of the decoding process in the time domain.

[0009] Preferably, the region extraction module internally deploys a rectangular window mapping operator, the execution logic of which is as follows: Using the physical coordinates of the candidate region center output by the feature detection module as the geometric anchor point, and combining the code body size estimation parameters and the preset edge redundancy margin, the multiple boundary physical addresses of the target region of interest in the physical space are calculated. The region extraction module includes dynamic boundary adjustment logic, which dynamically expands or contracts the search radius of the rectangular window mapping operator based on the displacement vector fed back by the spatiotemporal correlation tracking module, so as to ensure that the QR code body structure is completely covered in the spatial dimension. After being defined by the region extraction module, the subsequent image preprocessing operators, binarization operators, and edge enhancement operators of the fast decoding system are all limited to the memory address range corresponding to the target region of interest. The region extraction module is logically coupled to the output of the feature detection module. The region extraction module is configured to dynamically define a closed, localized subset of pixels in the whole original image based on the salient feature detection results. The module calculates the four boundary physical addresses of the target region of interest by executing a rectangular window mapping operator, taking the center coordinates of the candidate region as a reference, combining the size estimation parameters of the QR code and the preset edge redundancy margin. The region extraction module has dynamic expansion capability. When the system detects that the QR code target is in motion, the module automatically adjusts the geometric boundary of the region of interest based on the displacement vector of the previous frame to ensure that the QR code structure is completely enclosed in the spatial dimension. Through the physical isolation effect of this module, all subsequent image preprocessing operators, binarization operators, and edge enhancement operators are strictly restricted to be executed within the target region of interest, thereby avoiding the execution of invalid arithmetic and logical operations on the global background pixels and realizing the precise allocation of computing resources in the spatial dimension.

[0010] Preferably, the spatiotemporal correlation tracking module is internally deployed with a state storage buffer and a spatial coordinate prediction operator; The state storage buffer is used to save the physical parameters of the previous frame that was successfully decoded. The physical parameters include the spatial coordinate components of the QR code center point, the rotation angle components of the image plane, and the perspective deformation feature components. The spatial coordinate prediction operator includes executing a Kalman filter algorithm or a linear extrapolation operator to calculate the expected spatial probability distribution of the QR code target in the current frame based on the sampling interval time between consecutive frames and the displacement increment of the previous period. The expected spatial probability distribution is converted into an execution signal to instruct the region extraction module to skip the execution process of the downsampling algorithm and directly delineate the local pixel acquisition range based on the predicted position. The spatiotemporal correlation tracking module is configured to construct a feedback loop based on state features in a continuous video frame sequence. The spatiotemporal correlation tracking module is internally deployed with a spatial coordinate prediction operator and a state storage buffer. The state storage buffer is used to store the QR code position component, rotation angle component, and deformation feature component of the previously decoded QR code. The spatial coordinate prediction operator is configured to be based on the Kalman filter algorithm or the linear extrapolation operator. It calculates the expected spatial probability distribution of the QR code target in the current frame according to the sampling interval and displacement increment between consecutive frames. The logical mechanism is that when the system enters the continuous scanning mode, the spatiotemporal correlation tracking module generates a priority execution signal, which forces the region extraction module to directly delineate the search window according to the predicted spatial position, while temporarily shielding the full-domain blind search logic of the feature detection module. This spatiotemporal coupling processing method enables the system to evolve from a stateless discrete decoding mode to a trajectory tracking mode with context memory. It removes the computational redundancy between frames from the underlying architecture and greatly shortens the locking time under dynamic capture mode.

[0011] Preferably, the localization fast decoding module integrates an adaptive local binarization operator, and the execution logic of the adaptive local binarization operator includes: Gray-level histogram statistics are performed on the pixels within the target region of interest to calculate a dynamic threshold reflecting the local illumination characteristics; The dynamic threshold is used to perform binarization processing on local pixel blocks to eliminate the interference of uneven background illumination across the entire domain on code point determination; Preferably, the localization fast decoding module integrates a perspective transformation correction operator, and the execution logic of the perspective transformation correction operator includes: Four feature vertices within the target region of interest are identified, and a homography matrix is ​​constructed using the least squares method. The homography matrix is ​​used to perform nonlinear mapping of spatial coordinates, restoring the deformed code body caused by the tilt of the shooting angle into a standard square bitmap in the logic plane; Preferably, the localized fast decoding module integrates a code point sampling array and a Reed-Solomon error correction algorithm unit. The code sampling array samples and shells the logic level of the black and white module according to the corrected geometric mapping relationship to extract the original bit stream data; The Reed-Solomon error correction algorithm unit uses the principle of redundant polynomials to automatically repair the error bits caused by physical damage in the original bit stream data. The localization fast decoding module interacts directly with the region extraction module. The localization fast decoding module is configured to perform in-depth semantic analysis and bitstream conversion on the extracted local pixel blocks. The module integrates an adaptive local binarization operator, a perspective transformation correction operator, a code point sampling array, and a Reed-Solomon error correction algorithm unit. The adaptive local binarization operator is configured to perform statistical analysis only on the grayscale distribution within the target region of interest and calculate the local dynamic threshold, thereby effectively overcoming the interference of uneven global illumination on binarization accuracy. The perspective transformation correction operator identifies four feature vertices within the region of interest, constructs a homography matrix, and restores the deformed code body projection caused by the tilt of the shooting angle to a standard square bitmap. The code sampling array extracts the logic level of the black and white module with sub-pixel precision based on the corrected geometric mapping relationship. The extracted original bitstream is verified and damaged by the Reed-Solomon error correction algorithm unit. Since all complex geometric transformations and logical verifications are performed in a very small local area, the operation cycle of the localized fast decoding module is reduced by an order of magnitude compared with the traditional global module.

[0012] The fast decoding system for QR code scanners based on image recognition provided by this invention operates through the following collaborative mechanism: At the initial stage of system startup, the image acquisition module captures the first high-definition image. Since the state storage buffer is empty at this time, the feature detection module is triggered and locks the candidate region through low sampling rate feature extraction. The region extraction module cuts out a local window containing the QR code body from the original pixel space; The localized fast decoding module processes the pixel data within the window at extremely high speed and outputs the decoding result. Upon successful decoding, the spatiotemporal correlation tracking module acquires the coordinate information of the current frame and stores it in the state storage buffer. When processing subsequent frame images, the spatiotemporal correlation tracking module predicts the target region based on the prior coordinates, guiding the extraction module to directly locate it, thereby skipping the global saliency detection step and achieving zero-redundancy accelerated decoding in continuous time series.

[0013] Preferably, a pixel bus arbitration operator is deployed between the image acquisition module and the feature detection module; The pixel bus arbitration operator obtains the processor's load rate and temperature values ​​through the system kernel interface. When the values ​​reach a preset threshold, it modifies the sampling step size register of the downsampling operator to achieve nonlinear compression of the pixel density of the proxy mapping table. When the processor's load rate or operating temperature exceeds a preset threshold, the pixel bus arbitration operator automatically adjusts the sampling step size of the downsampling operator to reduce system power consumption by lowering the pixel density of the proxy mapping table. A pixel bus arbitration operator is also deployed between the image acquisition module and the feature detection module. The pixel bus arbitration operator is configured to dynamically adjust the compression ratio of the downsampling operator according to the real-time load rate of the processor. When the processor power consumption exceeds a preset threshold, the operator automatically increases the downsampling step size, at the cost of sacrificing a very small proportion of detection sensitivity, to ensure the robustness of the system under high temperature or low power conditions.

[0014] Preferably, the localized fast decoding module includes a self-healing feedback mechanism, which includes: When the Reed-Solomon error correction algorithm unit feeds back an error correction failure signal, the localization fast decoding module sends a boundary expansion instruction to the region extraction module; The boundary expansion instruction forces the region extraction module to enlarge the current target region of interest window by a preset step size pixel value in order to recapture the QR code still area information lost due to motion blur or edge cropping, until the global search mode is triggered or decoding is successful. The localized fast decoding module has a self-healing feedback mechanism. When the Reed-Solomon error correction algorithm unit fails to correct errors, the module sends a boundary expansion instruction to the region extraction module. The boundary expansion instruction forces the extraction module to enlarge the current target region of interest window by a preset step size in order to recapture static quiet area information that may have been lost due to motion blur or edge clipping. This localized, incremental search strategy ensures that the system can maintain a very high decoding success rate even under extreme interference environments.

[0015] The beneficial effects of this invention are as follows: 1. The present invention discloses a fast decoding system for QR code scanners based on image recognition. Through spatial collaboration between a feature detection module and a region extraction module, this invention completely breaks through the bottleneck of traditional QR code scanning and recognition systems performing indiscriminate calculations on the entire image. By employing a two-level architecture of low-resolution proxy spatial addressing and local high-resolution spatial decoding, it significantly reduces redundant computational load in ultra-high-definition imaging. Experimental data shows that, with a megapixel-level image sensor configuration, this invention can reduce the number of processor instructions executed in a single decoding cycle by more than 80%, physically suppressing the temperature rise rate of the scanning device and extending the battery life of mobile devices. 2. The image recognition-based QR code scanner fast decoding system described in this invention, through the introduction of a spatiotemporal correlation tracking module, enables the system to possess a deep perception capability of inter-frame spatiotemporal correlation. Through closed-loop feedback of state features and spatial coordinate prediction, the system effectively utilizes prior physical information during scanning. This paradigm shift from blind scanning to tracking allows for deep optimization of single-frame processing latency in continuous decoding scenarios. In high-frequency scanning scenarios such as industrial production lines, this invention can support higher material throughput speeds, improving the overall throughput efficiency of automated processes. 3. The fast decoding system for QR code scanners based on image recognition described in this invention significantly enhances the robustness of the system under complex conditions through adaptive threshold calculation and perspective correction for local regions in its localized fast decoding module. By avoiding complex textures and lighting interference in the global background, the signal-to-noise ratio of the local binarization operator is greatly improved. Even when the target QR code has local damage, surface reflection, or tilting motion, this invention can still ensure the accuracy of the decoding result through precise local sampling and efficient error correction. 4. The image recognition-based QR code scanner fast decoding system described in this invention has strong hardware compatibility and scalability through its architecture design. By standardizing the signal interaction logic between various functional modules, the fast decoding system can seamlessly adapt to optical lenses and image sensor arrays of different specifications. Whether in consumer-grade mobile payment terminals or precision industrial vision inspection platforms, this invention can provide consistent and predictable high-speed decoding performance. Attached Figure Description

[0016] The invention will now be further described with reference to the accompanying drawings.

[0017] Figure 1 This is a structural block diagram of a fast decoding system for a QR code scanner based on image recognition, as described in this invention. Figure 2 This is a schematic diagram of the decoding process of a fast decoding system for QR code scanners based on image recognition, as described in this invention. Detailed Implementation

[0018] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0019] like Figure 1 and Figure 2 As shown in the embodiment of the present invention, a fast decoding system for a QR code scanner based on image recognition includes: The image acquisition module is used to continuously capture the raw pixel stream of the measured space using an optical sensor array; The feature detection module is used to construct a proxy mapping table in the global image space by executing a downsampling algorithm, and to lock the candidate region coordinates of the QR code target according to geometric topological constraints; The region extraction module is used to define a local subset of pixels containing the QR code body in the physical address space corresponding to the original pixel stream based on the coordinates of the candidate region, thus forming the target region of interest. The spatiotemporal correlation tracking module is used to store historical decoding state components and calculate the expected spatial probability distribution of the QR code target in the current frame based on the inter-frame sampling interval and displacement increment. The localized fast decoding module is used to perform adaptive binarization, perspective transformation correction, and Reed-Solomon error correction on a subset of local pixels and output the decoding result. In continuous scanning mode, the expected spatial probability distribution generated by the spatiotemporal correlation tracking module is used to guide the region extraction module to perform window positioning, so as to selectively shield the global search logic of the feature detection module.

[0020] The image acquisition module includes the ability to perform real-time capture of the raw pixel stream using a high-performance optical sensor array; In specific engineering implementations, the image acquisition module uses a high-sensitivity complementary metal-oxide-semiconductor (CMOS) image sensor or a charge-coupled device (CCD) image sensor. To ensure imaging stability in complex industrial lighting environments, the image acquisition module integrates a high-performance timing control operator. This timing control operator has microsecond-level pulse modulation capabilities and is logically coupled to an external illumination synchronization trigger via a dedicated integrated circuit. This means that at the start of each frame exposure, the timing control operator sends a precise level signal to drive the external light source for supplemental lighting, ensuring that the photon integration period is completely synchronized with the sensor's electronic shutter. This synchronization mechanism can suppress the influence of ambient stray light to the greatest extent, enabling the sensor pixel array to capture high-contrast, low-noise original optical signals.

[0021] Furthermore, the raw image data acquired by the image acquisition module is not directly processed by the central processing unit. Instead, it is pushed in real time to a preset dual-port static random access memory for logical mapping through direct memory access technology. This dual-port architecture allows the feature detection module to read the previous frame or the pixel row being processed in parallel while the image acquisition module is writing the current frame data, thereby providing a pixel addressing space with high bit width support and no conflict for subsequent parallel processing units. The image acquisition module supports ultra-high definition resolution modes, such as 4,000 or 8,000 resolutions. This high spatial sampling rate can convert QR codes located at the far end of the scene or with extremely small physical size into sufficiently clear digital components, laying the physical foundation for subsequent sub-pixel-level sampling.

[0022] The feature detection module is logically connected to the cache unit of the image acquisition module. Its core function is to quickly strip away background redundancy in the full-domain image space and locate potential QR code candidate regions. The feature detection module executes a feature component screening strategy based on low entropy values. For high-definition raw pixel streams, this module avoids performing dense convolution or edge detection operations at full resolution. Instead, it generates a low-resolution proxy mapping table of the raw image through a preset down-sampling operator. Specifically, the downsampling operator uses mean filtering or bilinear interpolation algorithms to compress the ultra-high-definition pixel stream to one-sixteenth or even smaller of its original size, constructing a multi-scale pyramid underlying proxy model.

[0023] Based on the low-resolution proxy mapping table, the geometric feature extraction operator deployed inside the feature detection module begins to intervene. This operator is configured to specifically search for features of a specific scale that match the location patterns (Finder Patterns) defined by the QR code standard. Because QR codes have a unique black-and-white ratio distribution of 1:1:3:1:1 at the three corners, the geometric feature extraction operator performs fast scanning in low-resolution space by calculating the magnitude distribution of the image gradient vector. When the operator detects feature points that satisfy the proportional law and whose geometric distribution conforms to the topological constraints, the system determines them as candidate regions. The final output signal of the feature detection module contains the central physical coordinates of these candidate regions and preliminary code size estimation parameters. This pioneering search mechanism effectively compresses the computational load that originally required millions of pixels to the tens of thousands of pixels level by performing operations in low-resolution space, thereby achieving a primary acceleration of the decoding process in the time domain and solving the resource dissipation problem caused by blind search in the whole domain.

[0024] The region extraction module receives candidate parameters from the feature detection module and is configured to perform precise surgical cutting in the global high-definition pixel stream. The logical goal of this module is to define a closed, localized region of interest. This module calculates the four boundary physical addresses of the local region in the original high-definition pixel space by executing a rectangular window mapping operator, using the center coordinates of the candidate region output by the feature detection module as the geometric anchor point, combining the code body size estimation parameters, and introducing a preset edge redundancy margin.

[0025] The key feature of the region extraction module is its dynamic expansion capability. In dynamic scanning scenarios such as industrial production lines, the QR code target being measured is often accompanied by significant physical displacement. This module will automatically obtain the displacement vector of the current target based on the feedback information provided by the spatiotemporal correlation tracking module. When the predicted displacement exceeds a preset threshold, the module automatically adjusts the geometric boundary of the region of interest and dynamically expands the search radius of the window. This dynamic boundary adjustment mechanism ensures that even if the QR code shifts position during high-speed movement, its complete code structure can still be completely wrapped by the local window in the spatial dimension. Through the physical isolation effect of this module, all subsequent image preprocessing operators, binarization operators, and edge enhancement operators are strictly restricted to be executed within the target region of interest. This precise spatial dimension avoids the processor performing invalid arithmetic and logical operations on meaningless background pixels (such as complex mechanical textures, environmental shadows, etc.), thereby improving the execution efficiency of this system.

[0026] The spatiotemporal correlation tracking module is the core logic hub for inter-frame collaborative decoding in this system. Unlike the traditional frame-by-frame independent decoding paradigm, this module constructs a feedback loop based on state features in a continuous video frame sequence. The spatiotemporal correlation tracking module is internally deployed with spatial coordinate prediction operators and state storage buffers; The state storage buffer, as a high-speed temporary storage unit, is used to save the key physical parameters of the previous frame's successful decoding, including the spatial coordinate components of the QR code's center point, the rotation angle components of the image plane, and the deformation feature components caused by perspective during shooting.

[0027] The spatial coordinate prediction operator is configured to perform trajectory calculations based on the Kalman filter algorithm or the linear extrapolation operator; In continuous scanning mode, the prediction operator calculates the expected spatial probability distribution of the QR code target in the current frame based on the sampling interval time between consecutive frames and the displacement increment of the previous cycle. The logical mechanism is that when the system recognizes that the scanning has entered a stable state, the spatiotemporal correlation tracking module will generate a priority execution signal, and the forced region extraction module will directly delineate the search window in the original pixel stream according to the predicted spatial position. At this point, the system will actively block or suspend the full-domain blind search logic of the feature detection module. This spatiotemporal coupling processing method enables the system to evolve from a stateless discrete decoding mode to a trajectory tracking mode with context memory. From the perspective of the underlying architecture, this module reduces the necessity of searching for targets from scratch by using prior knowledge, eliminates redundant calculations between frames, shortens the locking time under dynamic capture conditions, and achieves robust tracking of high-speed moving targets.

[0028] The localization fast decoding module, as the final semantic conversion unit of the system, interacts directly with the region extraction module and is dedicated to processing the extracted local pixel blocks. This module integrates a series of high-performance algorithm units, including adaptive local binarization operator, perspective transformation correction operator, code point sampling array, and Reed-Solomon error correction algorithm unit.

[0029] The adaptive local binarization operator employs a local threshold calculation strategy, which only performs histogram statistics on the grayscale distribution within the target region of interest. Since the illumination distribution within the local window is relatively uniform, the operator can effectively overcome the interference of uneven global ambient illumination (such as local strong light reflection and local shadow) on binarization accuracy by calculating the local dynamic threshold, thus ensuring the clarity of the black and white module boundaries.

[0030] The perspective transformation correction operator identifies four feature vertices within the region of interest and constructs a homography matrix using the least squares method. This matrix is ​​used to perform nonlinear mapping of spatial coordinates, projecting trapezoidal or irregularly deformed code bodies caused by the tilt of the shooting angle back into a standard square bitmap in the logic plane. The code bit sampling array then samples and shells the logic level of the black and white module at sub-pixel precision according to the corrected geometric mapping relationship, extracting the original bitstream data.

[0031] The extracted raw bitstream is verified by the Reed-Solomon error correction algorithm unit. This unit uses the principle of redundant polynomials to automatically compensate and repair error bits generated under harsh conditions (such as code body scratches and stains). Since all the above-mentioned complex geometric transformations, matrix operations and logical verifications are strictly limited to a very small local area (usually only accounting for less than one percent of the total area), the operation cycle of the localized fast decoding module is reduced by an order of magnitude compared with the traditional global processing module, ensuring extremely fast decoding feedback.

[0032] In the operational logic coordination mechanism of this system, the system's startup and evolution follow a highly intelligent adaptive path; In the first frame period after system startup, since the state storage buffer is in an initialized empty state, the system automatically triggers blind search mode. At this point, the feature detection module performs downsampling feature detection across the entire area to lock the initial position of the QR code; The region extraction module cuts out a local window, and the localized fast decoding module completes the initial decoding.

[0033] Once the first frame is successfully decoded, the spatiotemporal correlation tracking module immediately obtains the coordinates and deformation components of the frame and stores them in the buffer; In the processing of subsequent frames, the system switches to tracking mode. The spatiotemporal correlation tracking module directly guides the extraction module to locate the position based on the predicted displacement, skipping the time-consuming salient feature detection step. This seamless switch from blind search to tracking achieves zero-redundancy accelerated decoding in continuous time series.

[0034] Furthermore, a pixel bus arbitration operator is deployed between the image acquisition module and the feature detection module. This operator has a dynamic power consumption balancing function and is configured to dynamically adjust the compression ratio of the downsampling operator based on the processor's real-time load rate and temperature monitoring data. For example, when the processor core temperature rises or the battery level falls below a safe threshold, the arbitration operator automatically increases the downsampling step size (e.g., from four times compression to eight times compression). Although this strategy sacrifices a very small percentage of the sensitivity for detecting remote small code bodies, it can significantly reduce bus bandwidth consumption and computational power consumption, ensuring that the system will not throttle or crash due to overheating under high temperature or extreme load conditions, thus guaranteeing the robust operation of the system.

[0035] The localized fast decoding module has a self-healing feedback mechanism to deal with capture failures in dynamic scenes. When the Reed-Solomon error correction algorithm unit reports an error correction failure or is unable to construct a valid bit polynomial, the module does not simply discard the frame. Instead, it sends a boundary expansion instruction to the region extraction module. The boundary expansion instruction forces the extraction module to enlarge the current target region of interest window by a preset step size pixel value (e.g., expanding by twenty pixels per step) in order to recapture the QR code still area information that may have been lost due to severe motion blur or excessive edge cropping. This localized, incremental search strategy ensures that the system can maintain a very high decoding success rate even in extreme interference environments without restarting the full-domain scan.

[0036] Example 1: In this embodiment of the invention, the system is deployed on an industrial-grade handheld scanning terminal, which is equipped with a 20-megapixel CMOS sensor and a processor with a main frequency of 2.0 GHz; In the test scenario, the QR code to be scanned was located three meters away, with a physical size of two centimeters. The image acquisition module captured the raw pixel stream with a resolution of 5,300 levels. The feature detection module quickly locks down the candidate region within a 30,000-pixel proxy space through eight-fold downsampling, with a detection latency of 1.2 milliseconds; The region extraction module defines a 500 x 500 pixel ROI window, compressing the processing volume to two percent of the entire area. The localized fast decoding module completes adaptive binarization and RS error correction within a local window, with a total decoding time of 6.5 milliseconds per frame; The spatiotemporal correlation tracking module locked the trajectory, and the average decoding latency of the next ten consecutive frames further decreased to 4.2 milliseconds.

[0037] Comparative Example 1: Using a traditional full-domain QR code recognition and decoding system, deployed on the exact same hardware platform and test scenario, the system performs full-domain Gaussian filtering and global threshold binarization on the original 20-megapixel image. Due to the complex metallic reflections of the conveyor belt in the background, global binarization generates a lot of noise at the edges of the QR code, causing the localization pattern search algorithm to need to perform multiple iterations. The global perspective correction algorithm needs to handle the homography transformation of the entire image matrix, which has a huge computational load; The average decoding time per frame is as high as 85 milliseconds, and during dynamic movement, due to the lack of inter-frame tracking, there is obvious screen tearing leading to decoding failure.

[0038] Comparison data table: As can be seen from the above comparative data, under the background of ultra-high-definition imaging, the present invention can reduce the processor load of a single decoding cycle by more than an order of magnitude. This large-scale elimination of computational redundancy not only significantly suppresses the temperature rise of the device under high-intensity scanning conditions from a physical perspective, but also directly translates into a battery life advantage on mobile devices, changing the performance problem of performing indiscriminate calculations on the entire image in traditional QR code scanning and recognition systems.

[0039] With the support of the spatiotemporal correlation tracking module, the system exhibits predictive performance in continuous decoding mode. This paradigm shift from blind scanning to tracking enables the system to support higher material throughput speeds when dealing with high-frequency scanning scenarios such as industrial production lines. Traditional systems experience severe frame drops and capture failures at material speeds exceeding 1.5 meters per second, while this invention can maintain stable decoding output at a speed of 5.5 meters per second.

[0040] The localized fast decoding module, through deep semantic analysis of local areas, addresses the issue that in real-world logistics sorting scenarios, QR codes on package surfaces are often accompanied by glare, wrinkles, or localized dirt. This system, through a local adaptive threshold operator, can accurately capture subtle level changes in the code body. Even in cases of severe perspective distortion, the perspective transformation correction operator, through precise addressing of local vertices, constructs a homography matrix that can restore the bitmap with extremely high fidelity. Combined with the redundancy compensation of the Reed-Solomon error correction algorithm unit, this invention demonstrates extremely high data acquisition accuracy and depth in complex industrial environments.

[0041] By standardizing the signal interaction protocol between the image acquisition module and the internal processing module (such as adopting a unified pixel stream interface and control register definition), the system can seamlessly adapt to various mainstream optical modules on the market. Whether in handheld mobile payment terminals or gantry-type visual inspection systems in large warehouses, this system can provide consistent high-speed recognition performance by dynamically adjusting the arbitration operator and prediction parameters.

[0042] After the image acquisition module writes pixel data into SRAM, the feature detection module directly addresses it through the pixel bus. When performing downsampling, the module does not write the result back to main memory, but temporarily stores it in the processor's low-level cache (L1 / L2 Cache), which greatly reduces memory access latency. After defining the boundary, the region extraction module modifies the addressing mask of the DMA controller so that the subsequent localization fast decoding module only needs to read the pixel row with a specific offset from SRAM. This optimization at the storage access level, combined with the spatiotemporal correlation tracking module's advance prediction of the coordinates of the next frame, ensures the underlying logic support for ultra-fast decoding.

[0043] To ensure compatibility with different versions and densities of QR codes (such as QR codes, Micro QR codes, and Data Matrix codes), the localized fast decoding module integrates a multi-mode recognition operator. It can automatically switch the weight parameters of the decoding algorithm based on the feature ratio fed back by the feature detection module. For high-density QR codes, the system will automatically adjust the step size of the code sampling array and use sub-pixel interpolation technology to improve the accuracy of logic level determination.

[0044] In summary, this invention constructs a fast decoding system for QR code scanners based on image recognition. Through dynamic capture of salient image features, precise extraction of local regions, and logical reconstruction of inter-frame temporal correlation, it achieves a highly efficient, low-power, and robust optical coding and recognition scheme. This invention not only resolves the contradiction between megapixel-level image processing and real-time response performance, but also provides a highly deterministic technological evolution path for future higher-density information coding and recognition. In fields such as industrial assembly lines, logistics sorting, mobile payment, and precision manufacturing, the low-latency tracking and decoding characteristics exhibited by this system will greatly promote the efficiency upgrade of digital acquisition processes, possessing significant economic value and broad industrial application prospects. The logical coupling and physical synergy between the modules of this invention together constitute a closed-loop, adaptive QR code recognition ecosystem, which improves recognition speed while ensuring the accuracy and depth of data acquisition in complex industrial environments.

[0045] In implementing this invention, those skilled in the art can flexibly configure the hardware logic of the image acquisition module and the degree of parallelism of the feature detection module according to the specific processor architecture (such as ARM, RISC-V or DSP) and sensor interface protocol (such as MIPI CSI-2 or Parallel interface). This modular system design ensures that the invention can achieve optimal decoding performance on hardware platforms with different performance gradients.

[0046] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A fast decoding system for QR code scanners based on image recognition, characterized in that, The fast decoding system includes: The image acquisition module is used to continuously capture the raw pixel stream of the measured space using an optical sensor array; The feature detection module is used to construct a proxy mapping table in the global image space by executing a downsampling algorithm, and to lock the candidate region coordinates of the QR code target according to geometric topological constraints; The region extraction module is used to define a local subset of pixels containing the QR code body in the physical address space corresponding to the original pixel stream based on the coordinates of the candidate region, thereby forming a target region of interest. The spatiotemporal correlation tracking module is used to store historical decoding state components and calculate the expected spatial probability distribution of the QR code target in the current frame based on the inter-frame sampling interval and displacement increment. The localized fast decoding module is used to perform adaptive binarization, perspective transformation correction, and Reed-Solomon error correction on the local pixel subset and output the decoding result. In the case of continuous scanning, the expected spatial probability distribution generated by the spatiotemporal correlation tracking module is used to guide the region extraction module to perform window positioning, so as to selectively shield the global search logic of the feature detection module.

2. The fast decoding system for a QR code scanner based on image recognition according to claim 1, characterized in that, The image acquisition module includes a complementary metal-oxide-semiconductor image sensor or a charge-coupled device image sensor; The image acquisition module integrates a timing control operator, which has pulse modulation logic and is used to couple with the execution logic of the external illumination synchronization trigger to ensure that the integration period of the sensor pixel array is completely synchronized with the supplementary light pulse of the external light source. The image acquisition module pushes the acquired raw image data to a dual-port static random access memory (SRAM) for logical mapping using direct memory access technology. The dual-port SRAM is configured to allow the image acquisition module to write the current frame while supporting the feature detection module to perform parallel addressing access to historical pixel rows.

3. The fast decoding system for a QR code scanner based on image recognition according to claim 1, characterized in that, The feature detection module is internally equipped with a downsampling operator and a geometric feature extraction operator; The downsampling operator uses mean filtering or bilinear interpolation algorithms to perform proportional compression on the full-resolution original pixel stream in order to construct the proxy mapping table with a multi-scale pyramid structure. The geometric feature extraction operator is configured to calculate the magnitude distribution of the image gradient vector in the proxy mapping table and extract the 1:1:3:1:1 proportional components according to the positioning pattern defined by the QR code standard to identify the central physical coordinates of the candidate region and preliminary size estimation parameters.

4. The fast decoding system for a QR code scanner based on image recognition according to claim 1, characterized in that, The region extraction module internally deploys a rectangular window mapping operator, whose execution logic is as follows: Using the physical coordinates of the candidate region center output by the feature detection module as the geometric anchor point, and combining the code body size estimation parameters and the preset edge redundancy margin, the multiple boundary physical addresses of the target region of interest in the physical space are calculated. The region extraction module includes dynamic boundary adjustment logic, which dynamically expands or contracts the search radius of the rectangular window mapping operator based on the displacement vector fed back by the spatiotemporal correlation tracking module, so as to ensure that the QR code body structure is completely covered in the spatial dimension. After the region extraction module defines the region, the subsequent image preprocessing operators, binarization operators, and edge enhancement operators of the fast decoding system are all limited to the memory address range corresponding to the target region of interest.

5. A fast decoding system for a QR code scanner based on image recognition according to claim 1, characterized in that, The spatiotemporal correlation tracking module is internally deployed with a state storage buffer and a spatial coordinate prediction operator. The state storage buffer is used to save the physical parameters of the previous frame that was successfully decoded. The physical parameters include the spatial coordinate components of the QR code center point, the rotation angle components of the image plane, and the perspective deformation feature components. The spatial coordinate prediction operator includes executing a Kalman filter algorithm or a linear extrapolation operator to calculate the expected spatial probability distribution of the QR code target in the current frame based on the sampling interval time between consecutive frames and the displacement increment of the previous period. The expected spatial probability distribution is converted into an execution signal to instruct the region extraction module to skip the execution process of the downsampling algorithm and directly delineate the local pixel acquisition range based on the predicted position.

6. A fast decoding system for a QR code scanner based on image recognition according to claim 1, characterized in that, The localization fast decoding module integrates an adaptive local binarization operator, and the execution logic of the adaptive local binarization operator includes: Gray-level histogram statistics are performed on the pixels within the target region of interest to calculate a dynamic threshold reflecting the local illumination characteristics; The dynamic threshold is used to perform binarization processing on local pixel blocks to eliminate the interference of uneven background illumination across the entire domain on code position determination.

7. A fast decoding system for a QR code scanner based on image recognition according to claim 1, characterized in that, The localization fast decoding module integrates a perspective transformation correction operator, and the execution logic of the perspective transformation correction operator includes: Four feature vertices within the target region of interest are identified, and a homography matrix is ​​constructed using the least squares method. The homography matrix is ​​used to perform a nonlinear mapping of spatial coordinates, restoring the deformed code body caused by the tilt of the shooting angle into a standard square bitmap in the logic plane.

8. A fast decoding system for a QR code scanner based on image recognition according to claim 7, characterized in that, The localization fast decoding module integrates a code point sampling array and a Reed-Solomon error correction algorithm unit. The code sampling array samples and shells the logic level of the black and white module according to the corrected geometric mapping relationship to extract the original bit stream data; The Reed-Solomon error correction algorithm unit utilizes the principle of redundant polynomials to automatically repair erroneous bits caused by physical damage in the original bitstream data.

9. A fast decoding system for a QR code scanner based on image recognition according to claim 1, characterized in that, A pixel bus arbitration operator is deployed between the image acquisition module and the feature detection module; The pixel bus arbitration operator obtains the processor's load rate and temperature values ​​through the system kernel interface. When the values ​​reach a preset threshold, it modifies the sampling step size register of the downsampling operator to achieve nonlinear compression of the pixel density of the proxy mapping table. When the processor's load rate or operating temperature exceeds a preset threshold, the pixel bus arbitration operator automatically adjusts the sampling step size of the downsampling operator to reduce system power consumption by lowering the pixel density of the proxy mapping table.

10. A fast decoding system for a QR code scanner based on image recognition according to claim 8, characterized in that, The localized fast decoding module includes a self-healing feedback mechanism, which includes: When the Reed-Solomon error correction algorithm unit feeds back an error correction failure signal, the localization fast decoding module sends a boundary expansion instruction to the region extraction module; The boundary expansion instruction forces the region extraction module to enlarge the current target region of interest window by a preset step size pixel value in order to recapture the QR code still area information lost due to motion blur or edge cropping, until the global search mode is triggered or decoding is successful.