Author Message

<  extend  ~  QR codes

PostPosted: Thu Feb 05, 2009 7:04 am
Joined: Mon Feb 18, 2008 9:02 pmPosts: 22
Has anybody done QR codes in openframeworks ?

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

Cheers

Nick


Offline Profile
PostPosted: Thu Feb 05, 2009 7:05 pm
Joined: Fri Mar 02, 2007 3:07 pmPosts: 141Location: London

Offline Profile
PostPosted: Thu Feb 05, 2009 8:10 pm
User avatarJoined: Tue Jul 10, 2007 6:44 pmPosts: 238Location: nyc
This might work for decoding:
http://trac.koka-in.org/libdecodeqr



_________________
stefan hechenberger

http://linear.nortd.com/
Offline Profile
PostPosted: Fri Feb 06, 2009 6:45 pm
Joined: Thu Dec 18, 2008 1:26 pmPosts: 56
stefanix wrote:
This might work for decoding:
http://trac.koka-in.org/libdecodeqr


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 :)

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

Code:

...

   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);

...


Offline Profile
PostPosted: Fri Mar 13, 2009 10:47 am
Joined: Mon Feb 18, 2008 9:02 pmPosts: 22
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


Offline Profile
PostPosted: Fri Mar 13, 2009 12:58 pm
Joined: Mon Feb 18, 2008 9:02 pmPosts: 22
I managed to get it compiling now. Cant recognise whats coming out as text but will fiddle more now


Offline Profile
PostPosted: Wed Jul 29, 2009 10:51 am
Joined: Wed Feb 04, 2009 11:13 amPosts: 57
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.



_________________
Portfolio: http://www.mrkbrz.com/ | Work in Progress: http://work.mrkbrz.com/
Offline Profile
PostPosted: Sun Sep 13, 2009 3:41 am
Joined: Sun Sep 13, 2009 3:36 amPosts: 1
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:


Offline Profile
PostPosted: Sun Sep 13, 2009 11:33 pm
Joined: Wed Feb 04, 2009 11:13 amPosts: 57
Are you getting an error?



_________________
Portfolio: http://www.mrkbrz.com/ | Work in Progress: http://work.mrkbrz.com/
Offline Profile
PostPosted: Mon Nov 09, 2009 3:14 pm
Joined: Thu Oct 11, 2007 8:54 pmPosts: 20Location: Stockholm, Sweden
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?


Offline Profile
PostPosted: Mon Nov 09, 2009 3:24 pm
Joined: Wed Feb 04, 2009 11:13 amPosts: 57
Could you paste in your code, and I'll try to run it my machine, see if it works over here.



_________________
Portfolio: http://www.mrkbrz.com/ | Work in Progress: http://work.mrkbrz.com/
Offline Profile
PostPosted: Mon Nov 09, 2009 5:43 pm
Joined: Sat Mar 29, 2008 1:05 pmPosts: 265Location: Lisbon, Portugal
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.
Code:
char *buf=new char[header.byte_size+1];


changing that line with this works and no memory is allocated
Code:
char buf[header.byte_size+1];



_________________
www.ruim.pt
Offline Profile
PostPosted: Mon Nov 09, 2009 10:05 pm
Joined: Wed Feb 04, 2009 11:13 amPosts: 57
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.



_________________
Portfolio: http://www.mrkbrz.com/ | Work in Progress: http://work.mrkbrz.com/
Offline Profile
PostPosted: Tue Nov 10, 2009 9:42 am
Joined: Thu Oct 11, 2007 8:54 pmPosts: 20Location: Stockholm, Sweden
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.

Image


Offline Profile
PostPosted: Tue Nov 10, 2009 11:40 am
Joined: Sat Mar 29, 2008 1:05 pmPosts: 265Location: Lisbon, Portugal
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



_________________
www.ruim.pt
Offline Profile

Display posts from previous:  Sort by:

All times are UTC
Page 1 of 2
17 posts
Go to page 1, 2  Next
Users browsing this forum: No registered users and 0 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron