Академический Документы
Профессиональный Документы
Культура Документы
Machine Vision
Components in QR code readers
QR Code
Image
Photo Conversion
Raw Data
1010111
0110011
1100011
QR Detector 0010101
http://www.yahoo.com
QR Properties (Basic)
Version Information
Position Patterns
- Determines the
correct orientation
Alignment Pattern
- Used for perspective
transformations
corrections
QR Detection Algorithm
Proceeds by horizontally column scanning the raw image pixels (or vertically
row scanning) to locate the 3 position patterns identified by the 1-1-3-1-1 ratio
B +
Points „A‟ and „C‟ may
+
be in the wrong order
C
so we can use the
cross product to
determine the angle
between point B and
The points at either the line segment AC
end of the hypotenuse +
are points „A‟ and „C‟ A
Perspective Corrections
Simply maps points on a known square to points on the distorted, rotated or
skewed square
Perspective Correction Algorithm
for (long i = 0; i < dimension; ++i) // y-axis direction
{
for (long j = 0; j < dimension; ++j) // x-axis direction
{
// The QR code is read as if it were an un-rotated and un-skewed image
POINT pt;
pt.x = (j * module_size) + half_module_size;
pt.y = (i * module_size) + half_module_size;
qr_store.set(pt, image.IS_BLACK(p));
}
}
Perspective Corrections
and rotation corrections for free (with no use of expensive trigonometry functions)
+ +
size = “bit size” x dimension
2
1
Only
version > 1
has the
alignment
4 pattern
+
+
3