QR Barcode Detection - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

QR Barcode Detection

Description:

Used for perspective transformations corrections. Version Information ... Colour to greyscale to monochrome. QR decoding. Extracting the contents (Message, URI etc... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 12
Provided by: esim
Category:

less

Transcript and Presenter's Notes

Title: QR Barcode Detection


1
QR Barcode Detection
  • Machine Vision

2
Components in QR code readers
QR Code
Image Conversion
Photo
1010111011001111000110010101
Raw Data
QR Detector
QR Decoder
This is what we are focusing on
http//www.yahoo.com
3
QR Properties (Basic)
Version Information
Position Patterns - Determines the correct
orientation
Position Patterns may be detected horizontally or
vertically by the unique B-W-B-B-B-W-B ratio
Data bit
Alignment Pattern - Used for perspective
transformations corrections
4
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
After a potential position pattern is located, it
is then cross-checked in the other direction
for the same ratio and position pattern size Also
determines the center of the position pattern
5
Triangle Point Ordering
Remember Pythagoras' theorem?
B

Points A and C may be in the wrong order so
we can use the cross product to determine the
angle between point B and the line segment AC

C
The points at either end of the hypotenuse are
points A and C

A
6
Perspective Corrections
Simply maps points on a known square to points on
the distorted, rotated or skewed square
7
Perspective Correction Algorithm
  • for (long i 0 i lt dimension i) // y-axis
    direction
  • for (long j 0 j lt 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
  • POINT p transform.TransformPoint(pt) //
    Does the perspective correcting
  • qr_store.set(pt, image.IS_BLACK(p))

8
Perspective Corrections
and rotation corrections for free (with no use of
expensive trigonometry functions)
size bit size x dimension


2
1
Only version gt 1 has the alignment pattern
size bit size x dimension
4


3
This is why locating 4 points is so important
9
Results
  • lt 1000 Source Lines of Code (SLOC)
  • Almost no floating-point code
  • Working to make it none
  • Very quick

10
Results
11
Future Work
  • Image filtering and cleaning
  • Histogram analysis
  • Colour to greyscale to monochrome
  • QR decoding
  • Extracting the contents (Message, URI etc)
  • ReedSolomon error correction
  • Level L
  • Level M
  • Level Q
  • Level H
Write a Comment
User Comments (0)
About PowerShow.com