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:






9 comments:

  1. Hi, link is dead, could you reup it, please :-)

    ReplyDelete
  2. Here is the unmodified libdecodeqr pack.

    http://rapidshare.com/files/416236149/libdecodeqr-0.9.3.tar.bz2.html

    Note: (License)The code is under LGPL.
    Non-commercial use only.

    ReplyDelete
  3. re-upload the library please...

    http://rapidshare.com/files/416236149/libdecodeqr-0.9.3.tar.bz2.html

    the link is dead...

    ReplyDelete
  4. Is it working for all the images?

    ReplyDelete
  5. No..
    It does not detect some other type of Encoding... I'm not sure why this is happening..

    ReplyDelete
  6. hi i got memory leak in galios .cpp in the following line


    new Nomial(gf,x);

    please help me to find out thanx
    prasanna

    ReplyDelete
  7. Maybe someone can upload working project somewhere? I get the lib from the rapidshare link, I have OpenCV installed and when I try to run webcam sample or simple sample I get cannot find openCV.

    So I set up paths correctly to point to OpenCV include and lib, then I get 133 errors saying pretty much everything is a redefinition in ws2def.h and winsock2.h and also some syntax errors in ecidecoder.h

    ReplyDelete
  8. http://trac.koka-in.org/libdecodeqr doesn't work anyore

    ReplyDelete
  9. i got an error when compiling,
    1>c:\josephholsten\libdecodeqr\imagereader.cpp(1097): error C2094: 'exit' is not defined

    =S i dont know how to fic it, any suggestion pleasE?

    ReplyDelete