SlideShare a Scribd company logo
1 of 2
Download to read offline
QR CODE DECODING AND IMAGE PREPROCESSING
EN3552 –IMAGE PROESSING AND MACHINE VISION
100584R – W.A.H.R.Weerathunge
Motivation
QR or Quick Response Code is a method of compressing
High amounts of Data to 2D data matrix images. The
Data can be Quickly Read and Decoded Using a smart
phone.
Readability at High Speed is the main advantage of QR.
The ability to extract information from partially
destroyed or distorted QR codes, and the user friendly
ness, makes QR codes practical for businesses.
Problem Statement
Preprocessing QR codes Faster for Readability and
Writing a software to read embedded information from a
captured image from Smart Phones. Acquisition in
different angles and distances, coupled with the
geometric distortion and flat distortion caused by image
capture device, the image of the QR codes will be
rotated, zoomed and stretched. To solve the problems
above, two-dimensional code image should have a series
of image processing before adopting national standards
for rapid response code decoding algorithm
Outline of the solution
Recognition Based on Image Processing
The algorithm for QR code recognition process based on
image processing is showed in fig. 1.
Binarization
Images collected are converted to grayscale format by
gray-scale processing. I have chosen the global threshold
method (OTSU method) in ordinary light condition
Tilt correction
When the image is being scanned, the position of QR
code often occurs tilt and it needs rotating operation for
correction. Researches have been done on this problem.
The proposed algorithms hollows out internal points of
the bar code, then gets the edge information and peaks
and slope detection of bar code with Hough transform
over a known point.
These methods above can be used to implement image
positioning, however, the time complexity is very high.
In This Project, I have used a novel processing technique
of simple datum line selection, rotation angle calculation
and tilt correction by the motivation gathered from
reference [1].
Algorithm Used
 Threshold the RGB image to a binary image
 Invert the image
 Find initial and final nonzero pixel points (
matrix elements )
 Store the values, get datum line
 Calculate Gradient of tilt
 Tilt correction
Equation: ∅ = 45 - 𝛼
Datum line gradient = ∅
Actual image tilt = 𝛼
Rotation Transformation
Transformation Matrix =
[ cos A sin A , sinA -cosA]
If scaling is considered ;
T = [ cos A sin A 0 , sin A -cos A 0 , 0 0 1 ]
Because the purpose of rotation coordinates is not
necessarily integer coordinates, in order to ensure the
image is not distorted, the gray value of purpose pixel
needs for interpolation in the image rotation
transformation.
The frequently-used methods include;
 the nearest neighbor interpolation
 bilinear interpolation
 tri-linear interpolation
Among them, the nearest neighbor method is
comparatively simple, processing time is the shortest,
and the real-time performance is very well, but the
quality of the result is not high, the process of rotation
prone to jagged boundaries.
This method is for applications that require high rotation
Real-time performance,
but less demanding procedures on image quality.
As the bottle neck in preprocessing QR codes is, time
complexity, I have used nearest neighbor technique in the
software decoder.
Nearest neighbor interpolation
To geometrically transform an image, the result we seek
is an image with transformed coordinates. The result of
applying the transformation function is generally not an
integer particularly in case of rotation and scaling. This
poses a problem since the image is defined on a grid. The
solution is interpolation.
n implementation, image rotation is done as follows.
Given I[m,n] to find a transformed image X[m., n.]
where [m., n.]= A x [m, n] + B according to the above
given equation:
1. Create a dummy array X[m., n.].
2. Find the locations [m, n] in I that correspond to
locations [., n.] in the image X by applying the
inverse transformation. I.e. A-1 ([m., n.]-B) = [m, n].
This can result in non-integer locations.
3. Find the pixel value at these source locations. If
it is non-integer valued locations, use an interpolation
function.
Round off the [m, n] and take the pixel value at that
location.
Results
During the experiment, the sample pictures were
collected by shooting in different direction using the
ordinary QR code generator as expected in problem
statement. Images include Different versions of bar code;
the tilt angle exists in the image;
This experiment is carried on in the windows XP system,
using MATLAB programming to process image, and
both image encoding and decoding adopts the method
proposed in QR national standards.
The Zebra Crossing library is used to decode the bit
stream of information embedded in QR, and as the time
permitted, I have also complied part of the decoder
module, even though, not stated in problem statement, to
be further improved for implementation in future. I have
also added Results from the Custom decoder, which is in
the form of a bit stream of information.
The results are as follows
References
[1]Yunhua Gu,Weixiang Zhang,"QR code recognition
Based on Image Processing",International Conference on
Information Science and Technology ,March 26-28, 2011
Nanjing, Jiangsu, China
[2]Wikipedia/QR-code
[3]M.Sun,LS.Fu,XTYang,S.H.zhang,"Image Analysis
Method for QR
Code's Automatic Recognition",Journal of University of
Electronic
Science and Technology of China, Vo1.38,No.6,pp.122-
125,Nov.2009.

More Related Content

What's hot

Project report of Cell phone detector circuit
Project report of Cell phone detector circuitProject report of Cell phone detector circuit
Project report of Cell phone detector circuitMoin Aman
 
Face Recognition System for Door Unlocking
Face Recognition System for Door UnlockingFace Recognition System for Door Unlocking
Face Recognition System for Door UnlockingHassan Tariq
 
VEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACH
VEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACHVEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACH
VEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACHJANAK TRIVEDI
 
Cell Phone Detector ppt- IIEST, Shibpur
Cell Phone Detector ppt- IIEST, ShibpurCell Phone Detector ppt- IIEST, Shibpur
Cell Phone Detector ppt- IIEST, ShibpurRanapratap Majee
 
Seminar Report on Wireless Mobile Charger
Seminar Report on Wireless Mobile ChargerSeminar Report on Wireless Mobile Charger
Seminar Report on Wireless Mobile ChargerEr Amreek Singh Masoun
 
three phase inverter
three phase inverterthree phase inverter
three phase inverterMalik Zaid
 
Updated field oriented control of induction motor.pptx
Updated field oriented control of induction motor.pptxUpdated field oriented control of induction motor.pptx
Updated field oriented control of induction motor.pptxMohit Sharma
 
seminar on brush less dc motors
seminar on brush less dc motors seminar on brush less dc motors
seminar on brush less dc motors vinayvickky
 
Vehicle number plate recognition using matlab
Vehicle number plate recognition using matlabVehicle number plate recognition using matlab
Vehicle number plate recognition using matlabKongara Sudharshan
 
Synchronous Motor Drives
Synchronous Motor DrivesSynchronous Motor Drives
Synchronous Motor DrivesDr.Raja R
 
Moving iron (MI) instruments
Moving iron (MI) instrumentsMoving iron (MI) instruments
Moving iron (MI) instrumentsChandan Singh
 
DPSK(Differential Phase Shift Keying) transmitter and receiver
DPSK(Differential Phase Shift Keying) transmitter and receiverDPSK(Differential Phase Shift Keying) transmitter and receiver
DPSK(Differential Phase Shift Keying) transmitter and receiverSumukh Athrey
 
Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)COMSATS Abbottabad
 
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENTSTREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENTm sivareddy
 

What's hot (20)

Wireless charging ppt
Wireless charging  pptWireless charging  ppt
Wireless charging ppt
 
Project report of Cell phone detector circuit
Project report of Cell phone detector circuitProject report of Cell phone detector circuit
Project report of Cell phone detector circuit
 
Obstacle avoiding robot(Lab report)
Obstacle  avoiding  robot(Lab report)Obstacle  avoiding  robot(Lab report)
Obstacle avoiding robot(Lab report)
 
Face Recognition System for Door Unlocking
Face Recognition System for Door UnlockingFace Recognition System for Door Unlocking
Face Recognition System for Door Unlocking
 
VEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACH
VEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACHVEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACH
VEHICLE CLASSIFICATION USING THE CONVOLUTION NEURAL NETWORK APPROACH
 
Cell Phone Detector ppt- IIEST, Shibpur
Cell Phone Detector ppt- IIEST, ShibpurCell Phone Detector ppt- IIEST, Shibpur
Cell Phone Detector ppt- IIEST, Shibpur
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Seminar Report on Wireless Mobile Charger
Seminar Report on Wireless Mobile ChargerSeminar Report on Wireless Mobile Charger
Seminar Report on Wireless Mobile Charger
 
N well
N wellN well
N well
 
Wireless charging ppt
Wireless charging pptWireless charging ppt
Wireless charging ppt
 
three phase inverter
three phase inverterthree phase inverter
three phase inverter
 
Updated field oriented control of induction motor.pptx
Updated field oriented control of induction motor.pptxUpdated field oriented control of induction motor.pptx
Updated field oriented control of induction motor.pptx
 
seminar on brush less dc motors
seminar on brush less dc motors seminar on brush less dc motors
seminar on brush less dc motors
 
Vehicle number plate recognition using matlab
Vehicle number plate recognition using matlabVehicle number plate recognition using matlab
Vehicle number plate recognition using matlab
 
Synchronous Motor Drives
Synchronous Motor DrivesSynchronous Motor Drives
Synchronous Motor Drives
 
1 phase semiconverter
1 phase semiconverter1 phase semiconverter
1 phase semiconverter
 
Moving iron (MI) instruments
Moving iron (MI) instrumentsMoving iron (MI) instruments
Moving iron (MI) instruments
 
DPSK(Differential Phase Shift Keying) transmitter and receiver
DPSK(Differential Phase Shift Keying) transmitter and receiverDPSK(Differential Phase Shift Keying) transmitter and receiver
DPSK(Differential Phase Shift Keying) transmitter and receiver
 
Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)
 
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENTSTREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
 

Viewers also liked

A low pre processing system for low quality QR code
A low pre processing system for low quality QR codeA low pre processing system for low quality QR code
A low pre processing system for low quality QR codeshameedcm3
 
Ieee 2014 2015 matlab projects completed final list
Ieee 2014 2015 matlab projects completed final listIeee 2014 2015 matlab projects completed final list
Ieee 2014 2015 matlab projects completed final listIEEEJAVAPROJECTS
 
Markus Holzer: Accelerating Form Based Image Preprocessing with Digital Hardware
Markus Holzer: Accelerating Form Based Image Preprocessing with Digital HardwareMarkus Holzer: Accelerating Form Based Image Preprocessing with Digital Hardware
Markus Holzer: Accelerating Form Based Image Preprocessing with Digital HardwareMFG Innovationsagentur
 
Color based image processing , tracking and automation using matlab
Color based image processing , tracking and automation using matlabColor based image processing , tracking and automation using matlab
Color based image processing , tracking and automation using matlabE2MATRIX
 
Inleiding matlab
Inleiding matlabInleiding matlab
Inleiding matlabtechna05
 
Image Processing
Image Processing Image Processing
Image Processing Jorgedevid5
 
Pedoman guru berprestasi sma tahun 2013
Pedoman guru berprestasi sma tahun 2013Pedoman guru berprestasi sma tahun 2013
Pedoman guru berprestasi sma tahun 2013Suaidin -Dompu
 
Secured qr code [Pankaj Jeswani and Team]
Secured qr code [Pankaj Jeswani and Team]Secured qr code [Pankaj Jeswani and Team]
Secured qr code [Pankaj Jeswani and Team]Pank Jes
 
Projectile motion ch 5 reg
Projectile motion ch 5 regProjectile motion ch 5 reg
Projectile motion ch 5 regZBTHS
 
Introduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysisIntroduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysis宗翰 謝
 
Image Steganography using LSB
Image Steganography using LSBImage Steganography using LSB
Image Steganography using LSBSreelekshmi Sree
 
IMAGE FUSION IN IMAGE PROCESSING
IMAGE FUSION IN IMAGE PROCESSINGIMAGE FUSION IN IMAGE PROCESSING
IMAGE FUSION IN IMAGE PROCESSINGgarima0690
 
Steganography Project
Steganography Project Steganography Project
Steganography Project Uttam Jain
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesDiwaker Pant
 
QR Codes PowerPoint Presentation
QR Codes PowerPoint PresentationQR Codes PowerPoint Presentation
QR Codes PowerPoint PresentationZachary Moore
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesSaideep
 

Viewers also liked (20)

Qr code ppt
Qr code pptQr code ppt
Qr code ppt
 
QR code
QR codeQR code
QR code
 
A low pre processing system for low quality QR code
A low pre processing system for low quality QR codeA low pre processing system for low quality QR code
A low pre processing system for low quality QR code
 
Ieee 2014 2015 matlab projects completed final list
Ieee 2014 2015 matlab projects completed final listIeee 2014 2015 matlab projects completed final list
Ieee 2014 2015 matlab projects completed final list
 
Markus Holzer: Accelerating Form Based Image Preprocessing with Digital Hardware
Markus Holzer: Accelerating Form Based Image Preprocessing with Digital HardwareMarkus Holzer: Accelerating Form Based Image Preprocessing with Digital Hardware
Markus Holzer: Accelerating Form Based Image Preprocessing with Digital Hardware
 
Makalah qr code 2
Makalah qr code 2Makalah qr code 2
Makalah qr code 2
 
Steganography in images
Steganography  in  imagesSteganography  in  images
Steganography in images
 
Color based image processing , tracking and automation using matlab
Color based image processing , tracking and automation using matlabColor based image processing , tracking and automation using matlab
Color based image processing , tracking and automation using matlab
 
Inleiding matlab
Inleiding matlabInleiding matlab
Inleiding matlab
 
Image Processing
Image Processing Image Processing
Image Processing
 
Pedoman guru berprestasi sma tahun 2013
Pedoman guru berprestasi sma tahun 2013Pedoman guru berprestasi sma tahun 2013
Pedoman guru berprestasi sma tahun 2013
 
Secured qr code [Pankaj Jeswani and Team]
Secured qr code [Pankaj Jeswani and Team]Secured qr code [Pankaj Jeswani and Team]
Secured qr code [Pankaj Jeswani and Team]
 
Projectile motion ch 5 reg
Projectile motion ch 5 regProjectile motion ch 5 reg
Projectile motion ch 5 reg
 
Introduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysisIntroduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysis
 
Image Steganography using LSB
Image Steganography using LSBImage Steganography using LSB
Image Steganography using LSB
 
IMAGE FUSION IN IMAGE PROCESSING
IMAGE FUSION IN IMAGE PROCESSINGIMAGE FUSION IN IMAGE PROCESSING
IMAGE FUSION IN IMAGE PROCESSING
 
Steganography Project
Steganography Project Steganography Project
Steganography Project
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
 
QR Codes PowerPoint Presentation
QR Codes PowerPoint PresentationQR Codes PowerPoint Presentation
QR Codes PowerPoint Presentation
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 

Similar to QR code decoding and Image Preprocessing

Image processing
Image processingImage processing
Image processingkamal330
 
Final Report for project
Final Report for projectFinal Report for project
Final Report for projectRajarshi Roy
 
Digital image forgery detection
Digital image forgery detectionDigital image forgery detection
Digital image forgery detectionAB Rizvi
 
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUESA STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUEScscpconf
 
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...cscpconf
 
Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...csandit
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Sciencebaaburao4200
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfGaurav Sharma
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit NotesAAKANKSHA JAIN
 
ppt 20BET1024.pptx
ppt 20BET1024.pptxppt 20BET1024.pptx
ppt 20BET1024.pptxManeetBali
 
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGA PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGIRJET Journal
 
An Introduction to digital image processing
An Introduction to digital image processingAn Introduction to digital image processing
An Introduction to digital image processingnastaranEmamjomeh1
 
Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...
Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...
Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...IJCSIS Research Publications
 
426 Lecture5: AR Registration
426 Lecture5: AR Registration426 Lecture5: AR Registration
426 Lecture5: AR RegistrationMark Billinghurst
 
Low Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmLow Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmIRJET Journal
 

Similar to QR code decoding and Image Preprocessing (20)

B018110915
B018110915B018110915
B018110915
 
Image processing
Image processingImage processing
Image processing
 
Ijcatr04041016
Ijcatr04041016Ijcatr04041016
Ijcatr04041016
 
Final Report for project
Final Report for projectFinal Report for project
Final Report for project
 
Digital image forgery detection
Digital image forgery detectionDigital image forgery detection
Digital image forgery detection
 
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUESA STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
 
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
IMPROVING IMAGE RESOLUTION THROUGH THE CRA ALGORITHM INVOLVED RECYCLING PROCE...
 
Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...Improving image resolution through the cra algorithm involved recycling proce...
Improving image resolution through the cra algorithm involved recycling proce...
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Science
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
ppt 20BET1024.pptx
ppt 20BET1024.pptxppt 20BET1024.pptx
ppt 20BET1024.pptx
 
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGA PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
mini prjt
mini prjtmini prjt
mini prjt
 
An Introduction to digital image processing
An Introduction to digital image processingAn Introduction to digital image processing
An Introduction to digital image processing
 
Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...
Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...
Image Stitching Algorithm: An Optimization between Correlation-Based and Feat...
 
Jc3416551658
Jc3416551658Jc3416551658
Jc3416551658
 
426 Lecture5: AR Registration
426 Lecture5: AR Registration426 Lecture5: AR Registration
426 Lecture5: AR Registration
 
Low Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithmLow Light Image Enhancement Using Zero-DCE algorithm
Low Light Image Enhancement Using Zero-DCE algorithm
 

QR code decoding and Image Preprocessing

  • 1. QR CODE DECODING AND IMAGE PREPROCESSING EN3552 –IMAGE PROESSING AND MACHINE VISION 100584R – W.A.H.R.Weerathunge Motivation QR or Quick Response Code is a method of compressing High amounts of Data to 2D data matrix images. The Data can be Quickly Read and Decoded Using a smart phone. Readability at High Speed is the main advantage of QR. The ability to extract information from partially destroyed or distorted QR codes, and the user friendly ness, makes QR codes practical for businesses. Problem Statement Preprocessing QR codes Faster for Readability and Writing a software to read embedded information from a captured image from Smart Phones. Acquisition in different angles and distances, coupled with the geometric distortion and flat distortion caused by image capture device, the image of the QR codes will be rotated, zoomed and stretched. To solve the problems above, two-dimensional code image should have a series of image processing before adopting national standards for rapid response code decoding algorithm Outline of the solution Recognition Based on Image Processing The algorithm for QR code recognition process based on image processing is showed in fig. 1. Binarization Images collected are converted to grayscale format by gray-scale processing. I have chosen the global threshold method (OTSU method) in ordinary light condition Tilt correction When the image is being scanned, the position of QR code often occurs tilt and it needs rotating operation for correction. Researches have been done on this problem. The proposed algorithms hollows out internal points of the bar code, then gets the edge information and peaks and slope detection of bar code with Hough transform over a known point. These methods above can be used to implement image positioning, however, the time complexity is very high. In This Project, I have used a novel processing technique of simple datum line selection, rotation angle calculation and tilt correction by the motivation gathered from reference [1]. Algorithm Used  Threshold the RGB image to a binary image  Invert the image  Find initial and final nonzero pixel points ( matrix elements )  Store the values, get datum line  Calculate Gradient of tilt  Tilt correction Equation: ∅ = 45 - 𝛼 Datum line gradient = ∅ Actual image tilt = 𝛼 Rotation Transformation Transformation Matrix = [ cos A sin A , sinA -cosA] If scaling is considered ; T = [ cos A sin A 0 , sin A -cos A 0 , 0 0 1 ] Because the purpose of rotation coordinates is not necessarily integer coordinates, in order to ensure the image is not distorted, the gray value of purpose pixel needs for interpolation in the image rotation transformation. The frequently-used methods include;  the nearest neighbor interpolation  bilinear interpolation  tri-linear interpolation Among them, the nearest neighbor method is comparatively simple, processing time is the shortest,
  • 2. and the real-time performance is very well, but the quality of the result is not high, the process of rotation prone to jagged boundaries. This method is for applications that require high rotation Real-time performance, but less demanding procedures on image quality. As the bottle neck in preprocessing QR codes is, time complexity, I have used nearest neighbor technique in the software decoder. Nearest neighbor interpolation To geometrically transform an image, the result we seek is an image with transformed coordinates. The result of applying the transformation function is generally not an integer particularly in case of rotation and scaling. This poses a problem since the image is defined on a grid. The solution is interpolation. n implementation, image rotation is done as follows. Given I[m,n] to find a transformed image X[m., n.] where [m., n.]= A x [m, n] + B according to the above given equation: 1. Create a dummy array X[m., n.]. 2. Find the locations [m, n] in I that correspond to locations [., n.] in the image X by applying the inverse transformation. I.e. A-1 ([m., n.]-B) = [m, n]. This can result in non-integer locations. 3. Find the pixel value at these source locations. If it is non-integer valued locations, use an interpolation function. Round off the [m, n] and take the pixel value at that location. Results During the experiment, the sample pictures were collected by shooting in different direction using the ordinary QR code generator as expected in problem statement. Images include Different versions of bar code; the tilt angle exists in the image; This experiment is carried on in the windows XP system, using MATLAB programming to process image, and both image encoding and decoding adopts the method proposed in QR national standards. The Zebra Crossing library is used to decode the bit stream of information embedded in QR, and as the time permitted, I have also complied part of the decoder module, even though, not stated in problem statement, to be further improved for implementation in future. I have also added Results from the Custom decoder, which is in the form of a bit stream of information. The results are as follows References [1]Yunhua Gu,Weixiang Zhang,"QR code recognition Based on Image Processing",International Conference on Information Science and Technology ,March 26-28, 2011 Nanjing, Jiangsu, China [2]Wikipedia/QR-code [3]M.Sun,LS.Fu,XTYang,S.H.zhang,"Image Analysis Method for QR Code's Automatic Recognition",Journal of University of Electronic Science and Technology of China, Vo1.38,No.6,pp.122- 125,Nov.2009.