2D Code Block Decoding via Otsu Thresholding and Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing two-dimensional code decoding methods face challenges in achieving precise segmentation and accurate decoding due to factors like varying media, lighting environments, and image quality issues, leading to poor binarization effects that affect decoding accuracy and efficiency.
Innovation Solution
A block decoding method that segments two-dimensional code images into regions based on position detection and correction patterns, calculates bit regions, and uses the Otsu method for gray-scale thresholding to improve segmentation precision and speed, while re-acquiring image data to prevent interference from previous binarization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the two-dimensional code image is segmented into n*n block regions for binarization, then interference from external environment is avoided, but the decoding process becomes complicated and one pixel does not indicate one data bit
Solution Approach 1:
The patent segments the two-dimensional code image into multiple regions based on position detection patterns and correction patterns, then further divides each region into bit regions. This hierarchical segmentation allows accurate decoding while maintaining a systematic approach to handling the image data.
Solution Approach 2:
The patent applies different processing strategies to different regions of the image. By identifying position detection patterns and correction patterns, the system treats functional modules differently from data regions, optimizing the decoding process for each specific area's characteristics.
2Productivity
If prior binarization is performed before segmentation, then initial image processing is completed, but the binarization effect is poor due to environmental factors like lighting unevenness and noise
Solution Approach 1:
The patent performs preliminary binarization of the entire image before segmentation to convert the image into black and white pixels. This initial processing step prepares the image for subsequent region identification and bit region segmentation, establishing a foundation for accurate decoding despite environmental variations.
Solution Approach 2:
The system adjusts binarization parameters dynamically based on the specific region being processed. By calculating gray-scale thresholds for each bit region based on average gray-scale values, the system adapts to local variations in lighting and noise characteristics.
3Speed
If the image is segmented based on functional modules, then positioning and decoding can be performed quickly, but the segmentation precision is reduced due to deformation of position detection patterns
Solution Approach 1:
The patent accounts for deformation of position detection patterns by dynamically adjusting the segmentation process. The system identifies the deformed patterns and adapts the bit region segmentation accordingly, maintaining precision even when the image undergoes geometric transformations.
Data Source
AI summary
A block decoding method includes: storing a received two-dimensional code image in an image data backup register; binarizing the received two-dimensional code image; searching for a boundary line of the two-dimensional code image; segmenting each of the regions into bit regions each of which corresponds to one bit data; re-acquiring the received two-dimensional code image stored in the image data backup register; calculating an average gray-scale value of all the pixels in the bit region as a gray-scale value of the bit region; calculating a gray-scale threshold of each of the bit regions n using the Otsu method; binarizing the bit region so as to obtain a binarized two-dimensional code image; and decoding the binarized two-dimensional code image. A system for a two-dimensional code is also disclosed.


