QR code processing method and apparatus thereof
First Claim
1. A processing method of quick response code (QR code), for converting an input image into a QR code according to the input image and finder pattern position information of the QR code, the QR code comprising a plurality of image blocks, the processing method comprising:
- a timing pattern searching procedure, comprising;
setting a plurality of searching axes among a plurality of finder patterns of the QR code;
for each searching axis;
applying a mask to derive a luminance information of the searching axis; and
deriving a maximum image block number corresponding to the searching axis according to the luminance information; and
determining a plurality of timing patterns according to a plurality of maximum image block numbers respectively corresponding to the searching axes;
an image block adjusting procedure, for selectively adjusting a position of each image block of the QR code according to the finder patterns and the timing patterns of the QR code, comprising;
deriving a plurality of known image blocks according to the finder patterns and the timing patterns;
an adjusting procedure, comprising;
for each image block within the QR code;
deriving an image block luminance value corresponding to the image block according to luminance values of all pixels of the image block within the QR code;
choosing a specific image block within a data area of the QR code, wherein the specific image block is neighboring the known image blocks but does not belong to the known image blocks;
deriving a reference luminance value according to a plurality of image block luminance values of the known image blocks neighboring the specific image block, and determining whether the specific image block is a bright image block or a dark image block according to the reference luminance value and an image block luminance value of the specific image block;
when the specific image block is a bright image block;
determining a first target image block among first neighboring image blocks according to image block luminance values of first neighboring image blocks, wherein the first neighboring image blocks are neighboring the specific image block but do not belong to the known image blocks; and
when an image block luminance value of the first target image block is larger than the image block luminance value of the specific image block and a difference thereof is larger than a bright image block threshold, moving the specific image block toward the first target image block by a specific distance;
when the specific image block is a dark image block;
determining a second target image block among second neighboring image blocks according to image block luminance values of second neighboring image blocks, wherein the second neighboring image blocks are neighboring the specific image block but do not belong to the known image blocks; and
when an image block luminance value of the second target image block is lower than the image block luminance value of the specific image block and a difference thereof is larger than a dark image block threshold, moving the specific image block toward the second target image block by a specific distance; and
categorizing the specific image block as a known image block; and
repeating the adjusting procedure until each image block within the data area of the QR code is categorized as the known image block; and
deriving an alignment pattern of the QR code according to the finder patterns and the timing patterns.
1 Assignment
0 Petitions
Accused Products
Abstract
A QR code processing method includes an edge processing process, a QR code positioning process and a projection modification process. The edge processing process converts an original image into a binarized input image. The QR code positioning process includes a group search process and a tag search process. The group search process includes: deriving a plurality of luminance groups according to luminance values of pixels within an input image; identifying a plurality of finder pattern groups complying with QR code finder pattern among the plurality of luminance groups according to a central point of each luminance group; and deriving position information of each finder pattern group. The tag search process derives position information of the QR code according to the position information of the finder pattern groups. The projection modification process converts the input image into a modified image according to the position information of the QR code.
-
Citations
2 Claims
-
1. A processing method of quick response code (QR code), for converting an input image into a QR code according to the input image and finder pattern position information of the QR code, the QR code comprising a plurality of image blocks, the processing method comprising:
-
a timing pattern searching procedure, comprising; setting a plurality of searching axes among a plurality of finder patterns of the QR code; for each searching axis; applying a mask to derive a luminance information of the searching axis; and deriving a maximum image block number corresponding to the searching axis according to the luminance information; and determining a plurality of timing patterns according to a plurality of maximum image block numbers respectively corresponding to the searching axes; an image block adjusting procedure, for selectively adjusting a position of each image block of the QR code according to the finder patterns and the timing patterns of the QR code, comprising; deriving a plurality of known image blocks according to the finder patterns and the timing patterns; an adjusting procedure, comprising; for each image block within the QR code; deriving an image block luminance value corresponding to the image block according to luminance values of all pixels of the image block within the QR code; choosing a specific image block within a data area of the QR code, wherein the specific image block is neighboring the known image blocks but does not belong to the known image blocks; deriving a reference luminance value according to a plurality of image block luminance values of the known image blocks neighboring the specific image block, and determining whether the specific image block is a bright image block or a dark image block according to the reference luminance value and an image block luminance value of the specific image block; when the specific image block is a bright image block; determining a first target image block among first neighboring image blocks according to image block luminance values of first neighboring image blocks, wherein the first neighboring image blocks are neighboring the specific image block but do not belong to the known image blocks; and when an image block luminance value of the first target image block is larger than the image block luminance value of the specific image block and a difference thereof is larger than a bright image block threshold, moving the specific image block toward the first target image block by a specific distance; when the specific image block is a dark image block; determining a second target image block among second neighboring image blocks according to image block luminance values of second neighboring image blocks, wherein the second neighboring image blocks are neighboring the specific image block but do not belong to the known image blocks; and when an image block luminance value of the second target image block is lower than the image block luminance value of the specific image block and a difference thereof is larger than a dark image block threshold, moving the specific image block toward the second target image block by a specific distance; and categorizing the specific image block as a known image block; and repeating the adjusting procedure until each image block within the data area of the QR code is categorized as the known image block; and deriving an alignment pattern of the QR code according to the finder patterns and the timing patterns.
-
-
2. A processing apparatus of quick response code (QR code), for converting an input image into a QR code according to the input image and finder pattern position information of the QR code, the QR code comprising a plurality of image blocks, the processing apparatus comprising:
-
a timing pattern searching module, comprising; a searching axis circuit, for setting a plurality of searching axes among a plurality of finder patterns of the QR code; a mask circuit, coupled to the searching axis circuit, where for each searching axis, the mask circuit applies a mask to derive a luminance information of the searching axis and derives a maximum image block number corresponding to the searching axis according to the luminance information, and a determining circuit, for determining a plurality of timing patterns according to a plurality of maximum image block numbers respectively corresponding to the searching axes; an image block adjusting module, coupled to the timing pattern searching module, for selectively adjusting a position of each image block of the QR code according to the finder patterns and the timing patterns of the QR code, comprising; a known image block determining circuit, for deriving a plurality of known image blocks according to the finder patterns and the timing patterns; and an adjusting circuit, coupled to the known image block determining circuit, comprising; an image block luminance unit, wherein for each image block within the QR code, the image block luminance unit derives an image block luminance value corresponding to the image block according to luminance values of all pixels of the image block within the QR code; a comparison unit, coupled to the image block luminance unit, for choosing a specific image block within a data area of the QR code, wherein the specific image block is neighboring the known image blocks but does not belong to the known image blocks;
deriving a reference luminance value according to a plurality of image block luminance values of the known image blocks neighboring the specific image block; and
determining whether the specific image block is a bright image block or a dark image block according to the reference luminance value and an image block luminance value of the specific image block;an adjusting unit, coupled to the comparison circuit, wherein; when the specific image block is a bright image block, the adjusting unit determines a first target image block among first neighboring image blocks according to image block luminance values of first neighboring image blocks, where the first neighboring image blocks are neighboring the specific image block but do not belong to the known image blocks; and
when an image block luminance value of the first target image block is larger than the image block luminance value of the specific image block and a difference thereof is larger than a bright image block threshold, the adjusting unit moves the specific image block toward the first target image block by a specific distance; andwhen the specific image block is a dark image block, the adjusting unit determines a second target image block among second neighboring image blocks according to image block luminance values of second neighboring image blocks, where the second neighboring image blocks are neighboring the specific image block but do not belong to the known image blocks; and
when an image block luminance value of the second target image block is lower than the image block luminance value of the specific image block and a difference thereof is larger than a dark image block threshold, the adjusting unit moves the specific image block toward the second target image block by a specific distance; anda categorizing unit, coupled to the adjusting unit, for categorizing the specific image block as a known image block; and an alignment pattern capture module, coupled to the timing pattern searching module and the image block adjustment module, for deriving an alignment pattern of the QR code according to the finder patterns and the timing patterns.
-
Specification