WO2017016445A1 - 二维码分块解码方法及系统 - Google Patents
二维码分块解码方法及系统 Download PDFInfo
- Publication number
- WO2017016445A1 WO2017016445A1 PCT/CN2016/090993 CN2016090993W WO2017016445A1 WO 2017016445 A1 WO2017016445 A1 WO 2017016445A1 CN 2016090993 W CN2016090993 W CN 2016090993W WO 2017016445 A1 WO2017016445 A1 WO 2017016445A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- dimensional code
- code image
- bit
- region
- position detection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1417—2D bar codes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/10544—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
- G06K7/10712—Fixed beam scanning
- G06K7/10722—Photodetector array or CCD scanning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06037—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/146—Methods for optical code recognition the method including quality enhancement steps
- G06K7/1478—Methods for optical code recognition the method including quality enhancement steps adapting the threshold for pixels in a CMOS or CCD pixel sensor for black and white recognition
Definitions
- the present invention relates to the field of two-dimensional code technologies, and in particular, to a two-dimensional code block decoding method and system.
- the two-dimensional code decoding algorithm based on image processing can be roughly divided into six steps: acquiring images, image preprocessing, positioning and correction, reading data, error correction, and decoding.
- the basic steps of image preprocessing are gradation transformation, image filtering, threshold segmentation, edge detection, and binarization is included in the threshold segmentation.
- an enhancement algorithm such as contrast adaptation and brightness adjustment
- the binarization algorithm is used to realize the segmentation of the background and the object in the image, and the image is converted into an image with only two colors of black and white for decoding.
- the two-dimensional code images captured by the two-dimensional code reading device vary widely, the influence of noise, and the image illumination. Unevenness, too large contrast and too small will make the conversion of the two-dimensional code image into a binarized image.
- the effect of the binarization process of the image is directly related to the reading effect of the two-dimensional code.
- the binarization method in the prior art has some shortcomings in dealing with complex backgrounds, and cannot deal with problems such as darkness, uneven illumination, too large or too small contrast, and thus cannot obtain a good binarization effect.
- the effect of obtaining the binarized image is not good, and the difficulty of subsequent decoding is increased, or the amount of calculation needs to be increased, or the accuracy of decoding is lowered, and the decoding step may not be smoothly performed.
- the Chinese invention patent publication CN104517089A discloses a two-dimensional code decoding system and a method thereof, the decoding method is: performing binarization processing on a two-dimensional code image to obtain a binarized image, the binarization processing including : cutting the two-dimensional code image to obtain a plurality of block regions; obtaining gray values of all the pixels of each block region, and obtaining gray values of each block region according to gray values of all the pixel points Determining a gray threshold of the block area according to an average gray value of a predetermined range in which each block area is located; and performing pixel points in the block area according to a gray threshold corresponding to each block area Binarization processing obtains a binarized image; decoding the binarized image to obtain information content included in the two-dimensional code.
- the code image When the code image is binarized, by performing a block operation on the code image, whether the pixel point in each of the block regions is determined to be black or determined to be white in the process of restoring the code image is to consider the pixel.
- the average gray value of the predetermined range of the block area can exclude the interference of the external environment, but the block of the two-dimensional code image only includes n*n block areas, where n>1, not according to
- the function module of the two-dimensional code is divided into blocks, and the information in the function module of the two-dimensional code cannot be quickly and accurately located and decoded, and the gray threshold of each block region is calculated, and the pixels in the block region are passed.
- the binarization is performed to decode the two-dimensional code image, and one pixel point is not equal to one two-dimensional code image data bit, and the process of decoding the two-dimensional code by pixel point binarization is complicated.
- the technical problem to be solved by the present invention is to provide a two-dimensional code block decoding method and system with accurate block and accurate decoding.
- the technical solution adopted by the present invention is:
- the received two-dimensional code image is stored in the image data backup register;
- Each region is divided into bit regions corresponding to one bit data according to the deformation amount of the position detection pattern and the deformation amount of the correction pattern;
- the binarized two-dimensional code image is decoded.
- the invention has the beneficial effects that: since the size, shape and position of the position detection pattern and the correction pattern corresponding to the version number of the two-dimensional code are fixed, the position detection pattern and the correction pattern are used to divide the area of the two-dimensional code image, and The region is divided into the bit regions corresponding to the bit data by the deformation amount of the position detection pattern and the deformation amount of the correction pattern.
- the method is reasonable, and the influence of the deformation amount of the two-dimensional code image on the division precision of the two-dimensional code image can be eliminated, and the division precision is high.
- the effect of fast decoding can be achieved; the two-dimensional code image is divided into at least one region, and the maximum inter-class variance method is used to calculate the gray threshold of each region, which can reduce the gray value of each region by environmental factors such as lighting
- the image reduces the likelihood of misalignment of the foreground and background colors in each area.
- the received two-dimensional code image is stored in the image data backup register;
- the binarized two-dimensional code image is decoded.
- the invention has the beneficial effects that some two-dimensional codes do not include a correction pattern, and since the size, shape and position of the position detection pattern corresponding to the version number of the two-dimensional code are fixed, the position detection pattern is used for the two-dimensional code.
- the image is divided into regions, and the region is divided into bit regions corresponding to the bit data by the deformation amount of the position detection pattern. The method is reasonable, and the influence of the deformation amount of the two-dimensional code image on the division precision of the two-dimensional code image can be eliminated, and the division precision and speed are high.
- the coordinates and gray value of the pixel of the code image can avoid the influence of the previous binarized data on the decoding accuracy of the two-dimensional code image, improve the accuracy of the two-dimensional code decoding, and divide the received two-dimensional code image into bit regions.
- a two-dimensional code block decoding system includes:
- a storage module storing the received two-dimensional code image in an image data backup register
- a first binarization module that binarizes the received two-dimensional code image according to a gray value of the pixel
- a first searching module for finding a boundary line of the two-dimensional code image according to the position detection pattern
- a second search module for finding a version number and a correction pattern in the two-dimensional code image
- the first dividing module divides the two-dimensional code image into regions by a boundary line of the two-dimensional code image, a straight line where the boundary line of the position detecting pattern is located, and a straight line where the boundary line of the corrected graphic is located;
- the first calculation module calculates the number of bits in each area according to the position detection pattern, the correction pattern, and the version number;
- the second dividing module divides each area into a bit area corresponding to one bit data according to the deformation amount of the position detecting pattern and the deformation amount of the correction pattern;
- a second calculating module calculating an average gray value of all pixel points in the bit region as a gray value of the bit region
- a third calculating module calculates a gray threshold of the region according to a gray value of each bit region by using a maximum inter-class variance method
- a second binarization module binarizing the region according to the gray threshold, to obtain a binarized two-dimensional code image
- the decoding module decodes the binarized two-dimensional code image.
- the invention has the beneficial effects that the received two-dimensional code image is stored in the image data backup register, so that the received two-dimensional code image is reacquired after the bit region is divided, and the received two-dimensional image is avoided before the bit region is divided.
- the effect of binarization of the code image on the decoding accuracy improve the decoding accuracy; find the boundary line, version number and correction pattern of the two-dimensional code image through the position detection pattern, and according to the boundary line of the position detection pattern and the boundary line of the correction pattern
- the two-dimensional code image is divided into regions, and the divided regions can reduce the influence of environmental factors such as light and scanning angle on the two-dimensional code image; according to the position detection pattern and correction
- the deformation amount of the graphic divides the region into bit regions corresponding to the bit data, which can eliminate the influence of the deformation amount of the received two-dimensional code image on the bit region segmentation accuracy, and simultaneously divide into bit regions to achieve fast decoding of the two-dimensional code image. effect.
- a two-dimensional code block decoding system includes:
- a storage module storing the received two-dimensional code image in an image data backup register
- a first binarization module that binarizes the received two-dimensional code image according to a gray value of the pixel
- a first searching module for finding a boundary line of the two-dimensional code image according to the position detection pattern
- a second search module for finding a version number in the two-dimensional code image
- the first dividing module divides the two-dimensional code image into regions by a boundary line of the two-dimensional code image and a line where the boundary line of the position detecting pattern is located;
- the first calculating module calculates the number of bits in each area according to the position detection pattern and the version number
- a second dividing module which divides each area into a bit area corresponding to one bit data according to the deformation amount of the position detecting pattern
- a second calculating module calculating an average gray value of all pixel points in the bit region as a gray value of the bit region
- a third calculating module calculates a gray threshold of the region according to a gray value of each bit region by using a maximum inter-class variance method
- a second binarization module binarizing the region according to the gray threshold, to obtain a binarized two-dimensional code image
- the decoding module decodes the binarized two-dimensional code image.
- the invention has the beneficial effects that some two-dimensional codes have no correction graphics, and the received two-dimensional code images are stored in the image data backup register, so that the received two-dimensional code images are reacquired after the bit region is divided, and the division is avoided.
- the effect of the binarization of the received two-dimensional code image on the decoding accuracy is improved, and the decoding precision is improved;
- the boundary line and the version number of the two-dimensional code image are searched by the position detection pattern, and the boundary line of the position detection pattern is
- the two-dimensional code image is divided into regions, and the divided regions can reduce the influence of environmental factors such as light and scanning angle on the two-dimensional code image;
- the region is divided into bit regions corresponding to the bit data according to the deformation amount of the position detection pattern, and the received two can be eliminated.
- the effect of the deformation amount of the dimension image on the accuracy of the bit region division, and the division into bit regions can achieve the effect of quickly decoding the two-dimensional code image.
- FIG. 1 is a flowchart of a two-dimensional code block decoding method according to Embodiment 1 of the present invention
- FIG. 2 is an original diagram of a Hanxin code according to Embodiment 1 of the present invention.
- FIG. 3 is a schematic diagram of blocking a Hanxin code according to Embodiment 1 of the present invention.
- FIG. 4 is a flowchart of a method for decoding a two-dimensional code block according to Embodiment 2 of the present invention.
- FIG. 5 is a schematic diagram of a QR code according to Embodiment 2 of the present invention.
- FIG. 6 is a schematic diagram of a boundary line of an RQ code according to Embodiment 2 of the present invention.
- FIG. 7 is a schematic diagram of a QR code block according to Embodiment 2 of the present invention.
- the most critical idea of the present invention is to divide the two-dimensional code image into regions by considering the deformation amount of the position detection pattern of the two-dimensional code image and the deformation amount of the correction pattern, and divide the divided region into bits corresponding to the bit data.
- the area has high block precision; after the two-dimensional code image is divided into bit regions, the two-dimensional code image is re-read, and the decoding is fast and accurate.
- a two-dimensional code block decoding method is provided.
- the received two-dimensional code image is stored in the image data backup register;
- Each region is divided into bit regions corresponding to one bit data according to the deformation amount of the position detection pattern and the deformation amount of the correction pattern;
- the binarized two-dimensional code image is decoded.
- the received two-dimensional code image is stored in the image data backup register;
- the binarized two-dimensional code image is decoded.
- the received two-dimensional code image is binarized according to the gray value of the pixel, specifically:
- the received two-dimensional code image is binarized according to the grayscale threshold.
- the received two-dimensional code image is binarized according to the gray value of the pixel, specifically for:
- the received two-dimensional code image is binarized according to the grayscale threshold.
- the calculation of the gray threshold of the received two-dimensional code image by the maximum inter-class variance method has the advantage of reducing the possibility of misalignment of the foreground color and the background color.
- the boundary line of the two-dimensional code image is found according to the position detection pattern, specifically:
- the black and white boundary point of the two-dimensional code image is fitted by a least squares method to obtain a boundary line of the two-dimensional code image.
- the boundary line of the two-dimensional code image is determined according to the three position detection patterns, and the two adjacent boundary lines in the two-dimensional code image are first determined according to the two position detection patterns having the same line boundary, and then two The boundary line is translated, and then the black and white boundary point near the straight line after translation is found and the boundary line of the two-dimensional code image is obtained by least squares fitting, which has the advantages of fast and accurate positioning.
- version number and the correction pattern in the QR code image are searched for, specifically:
- the position where the version number is located in the two-dimensional code image can be found;
- the image corresponding to the location where the version number is decoded is obtained by the version number
- the image corresponding to the position of the correction pattern is searched for in the two-dimensional code image and decoded to obtain a corrected pattern.
- the version number in the two-dimensional code image can be found according to the shape and position of the position detection pattern, the version number is decoded, and the position of the correction pattern can be determined according to the version number and the position detection pattern, and the searching process is reasonable.
- each area is divided into bit regions corresponding to one bit data according to the deformation amount of the position detection pattern and the deformation amount of the correction pattern, specifically:
- the length ratio of the adjacent two bits can be calculated
- a dividing point on two opposite boundaries connecting each area divides each area into a bit area of one bit number.
- the number of bits in the width and length directions of each region can be calculated according to the position detection pattern and the number of bits in the length and width directions of the correction pattern, thereby calculating the number of bits in each region, and detecting the position according to the position.
- the amount of deformation on the boundary of the graph and the corrected graph can calculate the length of the number of bits on the boundary of each region, and then divide each region into a bit region corresponding to one bit of data, and the method is reasonable, and the received method can be eliminated.
- the influence of the deformation amount of the two-dimensional code image on the accuracy of decoding the two-dimensional code image improves the decoding accuracy of the two-dimensional code image.
- each area is divided into bit regions corresponding to one bit data according to the deformation amount of the position detection pattern, specifically:
- the length ratio of the adjacent two bits can be calculated
- a dividing point on two opposite boundaries connecting each area divides each area into a bit area of one bit number.
- the number of bits in the width and length directions of each region can be calculated according to the number of bits in the length and width directions of the position detecting pattern, thereby calculating the number of bits in each region, and detecting the boundary of the graph according to the position.
- the amount of deformation can calculate the length of the number of bits on the boundary of each region, and then divide each region into a bit region corresponding to one bit of data. The method is reasonable, and the deformation of the received two-dimensional code image can be eliminated.
- the influence of the quantity on the accuracy of the decoding of the two-dimensional code image improves the decoding precision of the two-dimensional code image.
- Embodiment 1 of the present invention is:
- the received two-dimensional code image is stored in an image data backup register, and the received two-dimensional code is a Hanxin code, and the position detection pattern 10 and the correction pattern 11 of the Hanxin code are shown in FIG. 2;
- the received two-dimensional code image is binarized according to the gray value of the pixel, specifically:
- the position where the version number is located in the two-dimensional code image can be found;
- the image corresponding to the location where the version number is decoded is obtained by the version number
- the two-dimensional code image is divided into regions by a boundary line of the two-dimensional code image, a straight line where the boundary line of the position detecting pattern 10 is located, and a straight line where the boundary line of the correction pattern 11 is located;
- Each region is divided into bit regions corresponding to one bit data according to the amount of deformation of the position detecting pattern 10 and the amount of deformation of the correction pattern 11, specifically:
- the length ratio of the adjacent two bits can be calculated
- the binarized two-dimensional code image is decoded.
- the second embodiment of the present invention is:
- the received two-dimensional code image is stored in an image data backup register, the received two-dimensional code is a QR code, and the position detection pattern 12 of the QR code is shown in FIG. 5, FIG. middle
- the QR code has no correction pattern;
- the received two-dimensional code image is binarized according to the gray value of the pixel, specifically:
- the boundary line of the two-dimensional code image is searched according to the position detection pattern 12, specifically:
- the adjacent two boundary lines u and l are respectively translated, and the translated boundary line passes through the corner point Q and the corner point P of the position detecting pattern 12;
- the black and white boundary points of the two-dimensional code image are fitted by least squares method to obtain boundary lines d and r of the two-dimensional code image;
- the two-dimensional code image is divided into regions by a boundary line of the two-dimensional code image and a line where the boundary line of the position detecting pattern 12 is located, and a total of nine are respectively the first region 1, the second region 2, and the third region.
- the position detecting pattern 12 in FIG. 6 includes 49 bit regions in which the width is 7 bits of data and the length is 7 bits of data, that is, the lengths of the two sides of the first region 1, the second region 2, and the fourth region 4. All of the 7-bit data lengths, the width and length of the third region 3 are 7 bits of data length, and the lengths of the fifth region 5, the sixth region 6, the seventh region 7, and the eighth region 8 have one side. Long bit data;
- the length of the other side of the sixth area 6, the seventh area 7, and the eighth area 8 is 4v+3;
- Each area is divided into bit regions corresponding to one bit data according to the deformation amount of the position detecting pattern 12, specifically:
- the length ratio of the adjacent two bits can be calculated, which is specifically as follows:
- the straight line where it is located is the upper boundary line of the two-dimensional code image
- the binarized two-dimensional code image is decoded.
- a two-dimensional code block decoding system includes:
- a storage module storing the received two-dimensional code image in an image data backup register
- a first binarization module that binarizes the received two-dimensional code image according to a gray value of the pixel
- a first searching module for finding a boundary line of the two-dimensional code image according to the position detection pattern
- a second search module for finding a version number and a correction pattern in the two-dimensional code image
- the first dividing module divides the two-dimensional code image into regions by a boundary line of the two-dimensional code image, a straight line where the boundary line of the position detecting pattern is located, and a straight line where the boundary line of the corrected graphic is located;
- the first calculation module calculates the number of bits in each area according to the position detection pattern, the correction pattern, and the version number;
- the second dividing module divides each area into a bit area corresponding to one bit data according to the deformation amount of the position detecting pattern and the deformation amount of the correction pattern;
- a second calculating module calculating an average gray value of all pixel points in the bit region as a gray value of the bit region
- a third calculating module calculates a gray threshold of the region according to a gray value of each bit region by using a maximum inter-class variance method
- a second binarization module binarizing the region according to the gray threshold, to obtain a binarized two-dimensional code image
- the decoding module decodes the binarized two-dimensional code image.
- Embodiment 3 of the present invention is:
- a two-dimensional code block decoding system includes:
- a storage module storing the received two-dimensional code image in an image data backup register
- a first binarization module that binarizes the received two-dimensional code image according to a gray value of the pixel
- a first searching module for finding a boundary line of the two-dimensional code image according to the position detection pattern
- a second search module for finding a version number and a correction pattern in the two-dimensional code image
- the first dividing module divides the two-dimensional code image into regions by a boundary line of the two-dimensional code image, a straight line where the boundary line of the position detecting pattern is located, and a straight line where the boundary line of the corrected graphic is located;
- the first calculation module calculates the number of bits in each area according to the position detection pattern, the correction pattern, and the version number;
- the second dividing module divides each area into a bit area corresponding to one bit data according to the deformation amount of the position detecting pattern and the deformation amount of the correction pattern;
- a second calculating module calculating an average gray value of all pixel points in the bit region as a gray value of the bit region
- a third calculating module calculates a gray threshold of the region according to a gray value of each bit region by using a maximum inter-class variance method
- a second binarization module binarizing the region according to the gray threshold, to obtain a binarized two-dimensional code image
- the decoding module decodes the binarized two-dimensional code image.
- a two-dimensional code block decoding system includes:
- a storage module storing the received two-dimensional code image in an image data backup register
- a first binarization module that binarizes the received two-dimensional code image according to a gray value of the pixel
- a first searching module for finding a boundary line of the two-dimensional code image according to the position detection pattern
- a second search module for finding a version number in the two-dimensional code image
- the first dividing module passes through the boundary line of the two-dimensional code image and the boundary line of the position detecting pattern A straight line divides the two-dimensional code image into regions;
- the first calculating module calculates the number of bits in each area according to the position detection pattern and the version number
- a second dividing module which divides each area into a bit area corresponding to one bit data according to the deformation amount of the position detecting pattern
- a second calculating module calculating an average gray value of all pixel points in the bit region as a gray value of the bit region
- a third calculating module calculates a gray threshold of the region according to a gray value of each bit region by using a maximum inter-class variance method
- a second binarization module binarizing the region according to the gray threshold, to obtain a binarized two-dimensional code image
- the decoding module decodes the binarized two-dimensional code image.
- Embodiment 4 of the present invention is:
- a two-dimensional code block decoding system includes:
- a storage module storing the received two-dimensional code image in an image data backup register
- a first binarization module that binarizes the received two-dimensional code image according to a gray value of the pixel
- a first searching module for finding a boundary line of the two-dimensional code image according to the position detection pattern
- a second search module for finding a version number in the two-dimensional code image
- the first dividing module divides the two-dimensional code image into regions by a boundary line of the two-dimensional code image and a line where the boundary line of the position detecting pattern is located;
- the first calculating module calculates the number of bits in each area according to the position detection pattern and the version number
- a second dividing module which divides each area into a bit area corresponding to one bit data according to the deformation amount of the position detecting pattern
- a second calculating module calculating an average gray value of all pixel points in the bit region as a gray value of the bit region
- a third calculating module calculates a gray threshold of the region according to a gray value of each bit region by using a maximum inter-class variance method
- a second binarization module binarizing the region according to the gray threshold, to obtain a binarized two-dimensional code image
- the decoding module decodes the binarized two-dimensional code image.
- the two-dimensional code block decoding method and system determines the boundary of the two-dimensional code image according to the position detection pattern of the received two-dimensional code image, and has an accurate positioning effect;
- the line where the boundary line of the correction figure is located is divided into the area of the two-dimensional code image, which has the effect of facilitating decoding, and can reduce the influence of the external environment such as the light and the angle on the received two-dimensional code image;
- the position detection pattern and the correction pattern are The deformation amount divides the area into bit regions corresponding to the bit data, and has the effect of rapidly decoding the two-dimensional code image;
- the two-dimensional code image is divided into bit regions, and the received two-dimensional code image stored in the image data backup register is reacquired. It is equivalent to reacquiring the coordinates and gray value of the pixel of the received two-dimensional code image, which can improve the accuracy of the two-dimensional code decoding.
- the system is accurate in block, which can eliminate external interference and decode accurately.
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Electromagnetism (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Toxicology (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
Claims (10)
- 一种二维码分块解码方法,其特征在于,将接收到的二维码图像存储在图像数据备份寄存器中;根据像素点的灰度值对接收到的二维码图像进行二值化;根据位置探测图形寻找二维码图像的边界线;寻找二维码图像中的版本号及校正图形;通过二维码图像的边界线、位置探测图形的边界线所在的直线、校正图形的边界线所在的直线将二维码图像划分区域;根据位置探测图形、校正图形、版本号计算出每个区域的比特数;根据位置探测图形的变形量、校正图形的变形量将每个区域划分成一个比特数据对应的比特区域;重新获取图像数据备份寄存器中存储的接收到的二维码图像;计算所述比特区域中所有像素点的平均灰度值作为所述比特区域的灰度值;根据每个比特区域的灰度值采用最大类间方差法计算所述区域的灰度阀值;根据所述灰度阀值对所述区域进行二值化,得到二值化的二维码图像;解码二值化的二维码图像。
- 一种二维码分块解码方法,其特征在于,将接收到的二维码图像存储在图像数据备份寄存器中;根据像素点的灰度值对接收到的二维码图像进行二值化;根据位置探测图形寻找二维码图像的边界线;寻找二维码图像中的版本号;通过二维码图像的边界线、位置探测图形的边界线所在的直线将二维码图像划分区域;根据位置探测图形、版本号计算出每个区域的比特数;根据位置探测图形的变形量将每个区域划分成一个比特数据对应的比特区域;重新获取图像数据备份寄存器中存储的接收到的二维码图像;计算所述比特区域中所有像素点的平均灰度值作为所述比特区域的灰度值;根据每个比特区域的灰度值采用最大类间方差法计算所述区域的灰度阀值;根据所述灰度阀值对所述区域进行二值化,得到二值化的二维码图像;解码二值化的二维码图像。
- 根据权利要求1或2所述的二维码分块解码方法,其特征在于,根据像素点的灰度值对接收到的二维码图像进行二值化,具体为:根据像素点的灰度值用平均值法计算灰度阀值;根据灰度阀值对接收到的二维码图像进行二值化。
- 根据权利要求1或2所述的二维码分块解码方法,其特征在于,根据像素点的灰度值对接收到的二维码图像进行二值化,具体为:根据像素点的灰度值用最大类间方差法计算灰度阀值;根据灰度阀值对接收到的二维码图像进行二值化。
- 根据权利要求1或2所述的二维码分块解码方法,其特征在于,根据位置探测图形寻找二维码图像的边界线,具体为:根据三个位置探测图形可确定二维码图像中相邻的两条边界线;分别将相邻的两条边界线平移,并使平移后的边界线经过位置探测图形的角点;在平移后的边界线附近寻找接收到的二维码图像的黑白分界点;将所述二维码图像的黑白分界点用最小二乘法拟合得到二维码图像的边界线。
- 根据权利要求1所述的二维码分块解码方法,其特征在于,寻找二维码图像中的版本号及校正图形,具体为:根据二维码图像的边界线以及位置探测图形可寻找到二维码图像中版本号所在的位置;解码版本号所在的位置所对应的图像得到版本号;根据版本号及位置探测图形的形状确定校正图形的位置;在二维码图像中寻找校正图形的位置所对应的图像并解码得到校正图形。
- 根据权利要求1所述的二维码分块解码方法,其特征在于,根据位置探测图形的变形量、校正图形的变形量将每个区域划分成一个比特数据对应的比特区域,具体为:根据具有相同直线边界的位置探测图形或者校正图形的比特数及长度,可计算出相邻两个比特数所占的长度比;根据相邻两个比特数所占的长度比以及所述的相同直线边界上每个区域的比特数,可计算出所述相同直线边界上的每个区域的每个比特数所占的长度;依次计算出所有区域边界上的每个比特数所占的长度并记录划分点;连接每个区域的两个相对的边界上的划分点将每个区域划分成一个比特数的比特区域。
- 根据权利要求2所述的二维码分块解码方法,其特征在于,根据位置探测图形的变形量将每个区域划分成一个比特数据对应的比特区域,具体为:根据具有相同直线边界的位置探测图形的比特数及长度,可计算出相邻两个比特数所占的长度比;根据相邻两个比特数所占的长度比以及所述的相同直线边界上每个区域的比特数,可计算出所述相同直线边界上的每个区域的每个比特数所占的长度;依次计算出所有区域边界上的每个比特数所占的长度并记录划分点;连接每个区域的两个相对的边界上的划分点将每个区域划分成一个比特数的比特区域。
- 一种二维码分块解码系统,其特征在于,包括:存储模块,将接收到的二维码图像存储在图像数据备份寄存器中;第一二值化模块,根据像素点的灰度值对接收到的二维码图像进行二值化;第一寻找模块,根据位置探测图形寻找二维码图像的边界线;第二寻找模块,寻找二维码图像中的版本号及校正图形;第一划分模块,通过二维码图像的边界线、位置探测图形的边界线所在的直线、校正图形的边界线所在的直线将二维码图像划分区域;第一计算模块,根据位置探测图形、校正图形、版本号计算出每个区域的 比特数;第二划分模块,根据位置探测图形的变形量、校正图形的变形量将每个区域划分成一个比特数据对应的比特区域;获取模块,重新获取图像数据备份寄存器中存储的接收到的二维码图像;第二计算模块,计算所述比特区域中所有像素点的平均灰度值作为所述比特区域的灰度值;第三计算模块,根据每个比特区域的灰度值采用最大类间方差法计算所述区域的灰度阀值;第二二值化模块,根据所述灰度阀值对所述区域进行二值化,得到二值化的二维码图像;解码模块,解码二值化的二维码图像。
- 一种二维码分块解码系统,其特征在于,包括:存储模块,将接收到的二维码图像存储在图像数据备份寄存器中;第一二值化模块,根据像素点的灰度值对接收到的二维码图像进行二值化;第一寻找模块,根据位置探测图形寻找二维码图像的边界线;第二寻找模块,寻找二维码图像中的版本号;第一划分模块,通过二维码图像的边界线、位置探测图形的边界线所在的直线将二维码图像划分区域;第一计算模块,根据位置探测图形、版本号计算出每个区域的比特数;第二划分模块,根据位置探测图形的变形量将每个区域划分成一个比特数据对应的比特区域;获取模块,重新获取图像数据备份寄存器中存储的接收到的二维码图像;第二计算模块,计算所述比特区域中所有像素点的平均灰度值作为所述比特区域的灰度值;第三计算模块,根据每个比特区域的灰度值采用最大类间方差法计算所述区域的灰度阀值;第二二值化模块,根据所述灰度阀值对所述区域进行二值化,得到二值化的二维码图像;解码模块,解码二值化的二维码图像。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP16829811.5A EP3309704B1 (en) | 2015-07-27 | 2016-07-22 | Two-dimensional code partitioning and decoding method and system |
| BR112018001684-5A BR112018001684B1 (pt) | 2015-07-27 | 2016-07-22 | Método e sistema para decodificação de bloco de código bidimensional |
| US15/871,188 US10095903B2 (en) | 2015-07-27 | 2018-01-15 | Block decoding method and system for two-dimensional code |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510446105.4 | 2015-07-27 | ||
| CN201510446105.4A CN105069389B (zh) | 2015-07-27 | 2015-07-27 | 二维码分块解码方法及系统 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/871,188 Continuation US10095903B2 (en) | 2015-07-27 | 2018-01-15 | Block decoding method and system for two-dimensional code |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017016445A1 true WO2017016445A1 (zh) | 2017-02-02 |
Family
ID=54498751
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/090993 Ceased WO2017016445A1 (zh) | 2015-07-27 | 2016-07-22 | 二维码分块解码方法及系统 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US10095903B2 (zh) |
| EP (1) | EP3309704B1 (zh) |
| CN (1) | CN105069389B (zh) |
| WO (1) | WO2017016445A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108345816A (zh) * | 2018-01-29 | 2018-07-31 | 广州中大微电子有限公司 | 一种在光照不均匀下的二维码提取方法及系统 |
| CN113536822A (zh) * | 2021-07-28 | 2021-10-22 | 中移(杭州)信息技术有限公司 | 二维码校正方法、装置及计算机可读存储介质 |
| CN117057377A (zh) * | 2023-10-11 | 2023-11-14 | 青岛冠成软件有限公司 | 码的识别匹配方法 |
Families Citing this family (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105069389B (zh) * | 2015-07-27 | 2017-10-31 | 福建联迪商用设备有限公司 | 二维码分块解码方法及系统 |
| CN106529633B (zh) * | 2015-09-10 | 2019-11-15 | 阿里巴巴集团控股有限公司 | 二维码的生成方法、解码方法以及装置 |
| CN108764000B (zh) * | 2016-02-23 | 2021-06-08 | 海信集团有限公司 | 二维码快速解码方法 |
| CN107067403A (zh) * | 2017-03-13 | 2017-08-18 | 广州卓德信息科技有限公司 | 一种二维码图像二值化的改进方法 |
| CN109214230B (zh) * | 2017-07-05 | 2022-04-05 | 杭州海康威视数字技术股份有限公司 | 数据矩阵码识别方法、装置及电子设备 |
| US10909432B2 (en) * | 2017-10-06 | 2021-02-02 | Denso Wave Incorporated | Two-dimensional code composed of a plurality of types of cells |
| CN110610108B (zh) * | 2018-06-14 | 2024-09-27 | 恩智浦美国有限公司 | 条码扫描器的摄相接口电路 |
| CN109190437B (zh) * | 2018-08-01 | 2021-03-16 | 飞天诚信科技股份有限公司 | 一种读取二维码的方法及读取装置 |
| US11126808B1 (en) | 2019-05-30 | 2021-09-21 | Owens-Brockway Glass Container Inc. | Methods for dot code image processing on a glass container |
| CN110263595B (zh) * | 2019-06-25 | 2023-02-17 | 北京慧眼智行科技有限公司 | 一种二维码检测方法及装置 |
| CN110287752B (zh) * | 2019-06-25 | 2023-04-14 | 北京慧眼智行科技有限公司 | 一种点阵码检测方法及装置 |
| CN110309687B (zh) * | 2019-07-05 | 2020-06-05 | 华中科技大学 | 一种二维码图像的校正方法及校正装置 |
| CN111523341B (zh) * | 2020-04-03 | 2023-07-11 | 青岛进化者小胖机器人科技有限公司 | 二维码图像的二值化方法及设备 |
| CN114330400B (zh) * | 2020-10-12 | 2023-12-08 | 珠海格力电器股份有限公司 | 二维码图像处理方法、系统、装置、电子设备及存储介质 |
| CN112580380B (zh) * | 2020-12-11 | 2024-04-19 | 北京极智嘉科技股份有限公司 | 基于图形码的定位方法、装置、电子设备和存储介质 |
| CN112989860B (zh) * | 2021-01-12 | 2023-03-21 | 广东奥普特科技股份有限公司 | 一种qr码快速定位与解码方法 |
| CN112766012B (zh) * | 2021-02-05 | 2021-12-17 | 腾讯科技(深圳)有限公司 | 二维码图像的识别方法、装置、电子设备及存储介质 |
| CN113658164B (zh) * | 2021-08-24 | 2024-05-24 | 凌云光技术股份有限公司 | 一种二维码信息提取准确性的评估方法及装置 |
| CN114564978B (zh) * | 2022-04-27 | 2022-07-15 | 北京紫光青藤微系统有限公司 | 用于二维码解码的方法及装置、电子设备、存储介质 |
| CN114662519B (zh) * | 2022-05-24 | 2022-09-27 | 武汉朗修科技有限公司 | 基于位置探测图形梯度和强度先验的qr码盲去模糊方法 |
| CN118839708B (zh) * | 2024-07-17 | 2025-01-03 | 东莞市万酷电子科技有限公司 | 基于图像技术的扫描器用快速解码方法、系统和装置 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003248792A (ja) * | 2002-02-22 | 2003-09-05 | Seiko Epson Corp | 2次元コードのデコード方法、2次元コードのデコード装置、コンピュータに2次元コードのデコード方法を実行させるためのプログラム、このプログラムを記録した記録媒体 |
| CN102999772A (zh) * | 2012-11-14 | 2013-03-27 | 韩偲铭 | 一种新型矩阵式二维码的编解码方法 |
| CN104517089A (zh) * | 2013-09-29 | 2015-04-15 | 北大方正集团有限公司 | 一种二维码解码系统及其方法 |
| CN105069389A (zh) * | 2015-07-27 | 2015-11-18 | 福建联迪商用设备有限公司 | 二维码分块解码方法及系统 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7546950B2 (en) * | 2006-03-28 | 2009-06-16 | Seiko Epson Corporation | Method and apparatus for locating and decoding a two-dimensional machine-readable symbol |
| US20100327066A1 (en) * | 2009-06-25 | 2010-12-30 | Samsung Electronics Co. Ltd. | Network based reliable decoding of bar codes |
| CN101908125B (zh) * | 2010-06-01 | 2014-07-02 | 福建新大陆电脑股份有限公司 | Qr码条码解码芯片及其解码方法 |
| CN104517110B (zh) * | 2013-09-29 | 2018-01-05 | 北大方正集团有限公司 | 一种二维码图像的二值化方法及系统 |
| CN104143109B (zh) * | 2014-01-28 | 2017-04-05 | 深圳市雁联计算系统有限公司 | 一种二维码的编码和解码方法及其印刷物 |
| CN104184589B (zh) * | 2014-08-26 | 2018-09-07 | 重庆邮电大学 | 一种身份认证方法、终端设备,及系统 |
| CN104766037A (zh) * | 2015-03-20 | 2015-07-08 | 中国联合网络通信集团有限公司 | 一种二维码的识别方法及设备 |
-
2015
- 2015-07-27 CN CN201510446105.4A patent/CN105069389B/zh active Active
-
2016
- 2016-07-22 WO PCT/CN2016/090993 patent/WO2017016445A1/zh not_active Ceased
- 2016-07-22 EP EP16829811.5A patent/EP3309704B1/en not_active Not-in-force
-
2018
- 2018-01-15 US US15/871,188 patent/US10095903B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003248792A (ja) * | 2002-02-22 | 2003-09-05 | Seiko Epson Corp | 2次元コードのデコード方法、2次元コードのデコード装置、コンピュータに2次元コードのデコード方法を実行させるためのプログラム、このプログラムを記録した記録媒体 |
| CN102999772A (zh) * | 2012-11-14 | 2013-03-27 | 韩偲铭 | 一种新型矩阵式二维码的编解码方法 |
| CN104517089A (zh) * | 2013-09-29 | 2015-04-15 | 北大方正集团有限公司 | 一种二维码解码系统及其方法 |
| CN105069389A (zh) * | 2015-07-27 | 2015-11-18 | 福建联迪商用设备有限公司 | 二维码分块解码方法及系统 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3309704A4 * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108345816A (zh) * | 2018-01-29 | 2018-07-31 | 广州中大微电子有限公司 | 一种在光照不均匀下的二维码提取方法及系统 |
| CN113536822A (zh) * | 2021-07-28 | 2021-10-22 | 中移(杭州)信息技术有限公司 | 二维码校正方法、装置及计算机可读存储介质 |
| CN113536822B (zh) * | 2021-07-28 | 2024-05-03 | 中移(杭州)信息技术有限公司 | 二维码校正方法、装置及计算机可读存储介质 |
| CN117057377A (zh) * | 2023-10-11 | 2023-11-14 | 青岛冠成软件有限公司 | 码的识别匹配方法 |
| CN117057377B (zh) * | 2023-10-11 | 2024-01-12 | 青岛冠成软件有限公司 | 码的识别匹配方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| US10095903B2 (en) | 2018-10-09 |
| EP3309704A1 (en) | 2018-04-18 |
| EP3309704A4 (en) | 2018-07-25 |
| US20180137322A1 (en) | 2018-05-17 |
| CN105069389B (zh) | 2017-10-31 |
| CN105069389A (zh) | 2015-11-18 |
| EP3309704B1 (en) | 2020-09-30 |
| BR112018001684A2 (pt) | 2018-11-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017016445A1 (zh) | 二维码分块解码方法及系统 | |
| CN105069394B (zh) | 二维码加权平均灰度法解码方法及系统 | |
| US12254638B2 (en) | Method and system of recognizing object edges and computer-readable storage medium | |
| CN110866924A (zh) | 一种线结构光中心线提取方法及存储介质 | |
| CN105989317B (zh) | 一种二维码的识别方法及装置 | |
| US11017260B2 (en) | Text region positioning method and device, and computer readable storage medium | |
| CN113538491B (zh) | 一种基于自适应阈值的边缘识别方法、系统及存储介质 | |
| CN104700062A (zh) | 一种识别二维码的方法及设备 | |
| CN103489254B (zh) | 彩票的识别方法及系统 | |
| CN112419207A (zh) | 一种图像矫正方法及装置、系统 | |
| CN115619656B (zh) | 数字化档案纠偏矫正方法及系统 | |
| CN112419225B (zh) | 一种基于引脚分割的sop型芯片检测方法及系统 | |
| WO2017041600A1 (zh) | 一种汉信码特征图形检测方法及系统 | |
| CN110569845A (zh) | 一种试卷图像的校正方法及相关装置 | |
| CN116433701B (zh) | 一种工件孔洞轮廓的提取方法、装置、设备及存储介质 | |
| CN113076952A (zh) | 一种文本自动识别和增强的方法及装置 | |
| CN108256375B (zh) | 一种一维条形码扫描方法 | |
| CN113557520A (zh) | 字符处理及字符识别方法、存储介质和终端设备 | |
| CN113378847B (zh) | 字符分割方法、系统、计算机设备和存储介质 | |
| CN106295631A (zh) | 一种图像维吾尔文单词识别方法及装置 | |
| CN110263778A (zh) | 一种基于图像识别的抄表方法及装置 | |
| CN108256518B (zh) | 文字区域检测方法及装置 | |
| US20120321198A1 (en) | Image processing method and image processing apparatus | |
| CN109977959A (zh) | 一种火车票字符区域分割方法及装置 | |
| CN114140620B (zh) | 一种物体直线轮廓检测方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16829811 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2016829811 Country of ref document: EP |
|
| REG | Reference to national code |
Ref country code: BR Ref legal event code: B01A Ref document number: 112018001684 Country of ref document: BR |
|
| REG | Reference to national code |
Ref country code: BR Ref legal event code: B01E Ref document number: 112018001684 Country of ref document: BR Free format text: SOLICITA-SE APRESENTAR A TRADUCAO SIMPLES DA FOLHA DE ROSTO DA CERTIDAO DE DEPOSITO DA PRIORIDADE CN201510446105.4; OU DECLARACAO DE QUE OS DADOS DO PEDIDO INTERNACIONAL ESTAO FIELMENTE CONTIDOS NA PRIORIDADE REIVINDICADA, CONTENDO TODOS OS SEUS DADOS IDENTIFICADORES (TITULARES, NUMERO DE REGISTRO, DATA E TITULO), CONFORME O PARAGRAFO UNICO DO ART. 25 DA RESOLUCAO 77/2013, UMA VEZ QUE O DOCUMENTO DE AUTORIZACAO APRESENTADO FAZ REFERENCIA SOMENTE A PCT DISTINTO DO PEDIDO. |
|
| ENP | Entry into the national phase |
Ref document number: 112018001684 Country of ref document: BR Kind code of ref document: A2 Effective date: 20180126 |