OpenCV: Decoding QR Codes using libdecoderqr

"libdecodeqr" is a C/C++ library for decoding QR code based on JIS X 0510 and ISO/IEC18004.
This library is able to decode various image formats whether it's taken from a file, webcam, scanner, or any other image formats available.


Download the stable release. Extract the file. Open the libdecoderqr project file present in

Convert to latest version and Build the project. Add a sample project to it and build it.

Copy the sample images to the debug folder of the sample program. Open the command prompt and navigate to the debug folder of the sample program.
cd \libdecodeqr-0.9.3\src\sample\simple\Debug

Enter the name of the program followed by the name of the image.
C:\libdecodeqr-0.9.3\src\sample\simple\Debug\simple 1.jpg

You might want to add the following commands to the sample program to save the decoded information.

        char *buf=new char[header.byte_size+1];
        qr_decoder_get_body(decoder,(unsigned char *)buf,header.byte_size+1);
        //To save the decoded information as a comment in an XML file:
        //Add the following lines to the sampple program
        CvFileStorage* fs = cvOpenFileStorage("QR.xml",0,CV_STORAGE_WRITE);
        cvReleaseFileStorage( &fs );
        //Till Here.

Download Test Images: