QR codes

Has anybody done QR codes in openframeworks ?

Don’t want to start from scratch if somethingis already available.

Cheers

Nick

http://megaui.net/fukuchi/works/qrencode/index.en.html

Looks good for encoding.

(-;

J

This might work for decoding:
http://trac.koka-in.org/libdecodeqr

[quote author=“stefanix”]This might work for decoding:
http://trac.koka-in.org/libdecodeqr[/quote]

i was curious and tried,
it builds fine on osx tiger without changes at debug and throws a warning at release…

from the simpletest.cpp its the api is easy to use in oF and worked :slight_smile:

both libs look great, and QR codes are based on JIS X 0510 and ISO/IEC18004, used in many commercial products allready. just started to recognize them everywhere. *scared

  
  
  
...  
  
	QrDecoderHandle decoder=qr_decoder_open();  
	short stat=qr_decoder_decode_image(decoder, colorImg.getCvImage() );  
        printf("STATUS=%04x\n",stat);  
	  
	QrCodeHeader header;  
    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);  
    }  
   	qr_decoder_close(decoder);  
  
...  
  

This looks really good thanks for the replies. I am looking at getting decoding working, so have been looking at libdecodeqr.

I don’t know how to add this into open frameworks though as the whole adding code from elsewhere really confuses me.

Where do you put it and what do you add to an openframeworks project to get it to build?

I tried the build instructions that came with the download (for unix as I am Mac), but that fails on ./configure, asking for libcv.la

I changed the LDFLAGS so it is pointing to one of the openframewroks copies of libcv.la, but it fails to build the execuetable (presumably as its the unix libcv, not the Mac one).

Do I need to build it first, or just add the files in src/libdecodeqr to the src folder of an openframeworks project?

Any help muh appreciated

Nick

I managed to get it compiling now. Cant recognise whats coming out as text but will fiddle more now

I needed this for a project so I quickly whipped it into an addon for later use:

http://ofxmarek.googlecode.com/files/ofxQRDecoder.zip

fill your boots.

I know I’m reviving the dead but I need some serious help compiling libdecodeqr on Mac (Leopard).

My ultimate goal is to port it to the iPhone (as OpenCV has). However I’m a total newb when it comes to configure, make etc.

Help! :cry:

Are you getting an error?

Hi, I tried the ofxQRCode addon. I built it in Code::Blocks on Windows, with no problems … except for the detail that it doesn’t actually WORK. It’s not decoding anything.

I tried it with a bunch of different QR codes, grabbing images from a webcam. They look ok on screen, but I’m jut not getting any codes. No errors either.

Is there something I’m missing? Do you have a working example that uses your addon? And some sample QR codes that you know work? Any other ideas?

Could you paste in your code, and I’ll try to run it my machine, see if it works over here.

Hi,

i’ve also been experimenting with ofxQRCode and it only works with some QRcodes
Codes generated from here: http://qrcode.kaywa.com/ work very well but codes from here: http://www.quickmark.com.tw/En/diy/?qrText dont work at all. They’re simply not detected.
Any one have any idea why? i’m guessing its some sort of limitation with libqrdecode?

also i noticed a potential memory leak in the finQR(…) function
its creating a char buffer by allocating memory which doesn’t seem to be deallocated.

  
  
char *buf=new char[header.byte_size+1];  
  

changing that line with this works and no memory is allocated

  
  
char buf[header.byte_size+1];  
  

ah, cheers, that’s what I get for copy-pasting.

I noticed that it didn’t work with every QR too. As far as I can remember, it was better with bigger QR’s. I think I used that first link you posted, pelintra. bridell, maybe give a QR from http://qrcode.kaywa.com/ to see if we can isolate the problem.

I tried it with QRCodes from Kaywa, such as this one, and it works. Thanks.

I think maybe my main problem was that I thought it would be more stable in terms of reading qr codes at an angle, it seems they need to be really orthogonal to the camera for the codes to be detected.

does any one have any idea why the code from quickmark don’t work?
maybe they’re using different encoding methods? does any one know more about that?

thanks

Rui

Hi guys! How is the status of the QR addon ?

That runs well?
Which size is then necessary for a QR image?

hello all
has anyone had luck w this addon lately?
compiles fine on osx 10.5 w OF 061 and runs without errors but never finds the QR marker
I am using a recommended kaywa marker. i even loaded the marker image file in and fed it into the addon rather than a video frame but got the same results - a blank string returned. hoping to get this to run on an iphone, cheers.

you can try zbar, more faster and compatible

How about https://github.com/kylemcdonald/ofxZxing ?