OpenCV: Decoding QR Codes using libdecoderqr

libdecodeqr
"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:

Download the stable release. Extract the file. Open the libdecoderqr project file present in
$\libdecodeqr-0.9.3\src\libdecodeqr\

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

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



if(qr_decoder_get_header(decoder,&header))
{
        char *buf=new char[header.byte_size+1];
        qr_decoder_get_body(decoder,(unsigned char *)buf,header.byte_size+1);
        printf("%s\n",buf);
        
        //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);
        cvWriteComment(fs,buf,0);
        cvReleaseFileStorage( &fs );
        //Till Here.
}




Download Test Images: