Wednesday 16 April 2014

Welcome to QR Code pre-processing tutorial



Introduction


Quick Response Code (QR Code) referring to two-dimensional barcodes which allow larger data storage and can be scanned directly through mobile phone to obtain information. It was first founded by Toyota's subsidiary, Denso Wave, designed to scan high-speed component for vehicle tracking. QR code is able to encode all types of data including symbols and binary data, leading to 40 versions of QR code and four levels of error correction. Formation of QR codes is clear and simple that the pattern of QR codes are composed of 3 square patterns at (......)  of the code. However, mobile application only able to use version 1-10 of QR code due to limitations of mobile phone.   



Objective
•To create an application which is more user friendly
•To implement the image processing method to QR code decoder
•Improve the performance of QR code application that available by now



In this tutorial,I will show how QR code scanner actually works on scanning a QR code containing data. I will also provide explanations on pre-processing part of the scanner as most of the people have limited knowledge on functions of QR code scanner and how to obtain data stored inside QR code. 


I have completed a pre- processing application using Eclipse and it works well to analyze the pre-processing parts. 

Below are steps that involved in the scanner for pre-processing parts: 


Flow Chart of the Approach



Below is the sample of QR code printed on Nokia Lumia phone's brochure:



Step 1 : Gray Conversion




grayscale digital image is an image which the value of each pixel is single sample, that it carries only intensity information. Images of this sort, also known as black-and-white, are composed exclusively of shades of gray, varying from black at the weakest intensity to white at the strongest.
Grayscale images are often the result of measuring the intensity of light at each pixel in a single band of the electromagnetic spectrum.


Step 2: Binarisation (Threshold)


Binary images are also called bi-level or two-level. This means that each pixel is stored as a single bit—i.e., a 0 or 1. The names black-and-white,B&W, are often used for this concept, but may also designate any images that have only one sample per pixel, such as grayscale images.
Binary images often arise in digital image processing as masks or as the result of certain operations such as segmentation and thresholding.A binary image can be stored in memory as a bitmap, a packed array of bits. 


Step 3: Edge Detection



    Edge detection is the name for a set of mathematical methods which aim at identifying points in a digital image at which the image brightness changes sharply or, more formally, has discontinuities. The points at which image brightness changes sharply are typically organized into a set of curved line segments termed edges.  Edge detection is a fundamental tool in image processingmachine vision and computer vision, particularly in the areas of feature detection and feature extraction.


Step 4: Alignment Pattern Location


The scanner will detect the alignment patten location so that the QR code only can be scanned.The alignment pattern play a very important in QR code detection.If this alignment patten was damaged,hence this QR code will no longer be scan.


Step 5: Rotate







   

Thank for the alignment pattern so that this QR code can be scan by different angle as long as the all the finder pattern and alignment pattern detected in the frame of camera.


Step 6: Error correction and decoding
     





       17+4v=25