Druke
October 7th, 2009, 07:18 PM
To the point:
libdecodeqr-examples sample programs do not work, I think I understand why, but not how to fix it, nor how this is supposed to work in the debian package system.
I'm not sure if it is a "bug" because I would need someone to reproduce it 8-[ .
The longer part
Google has a barcode logo today, and it made me interested in barcode programming. My friend mentioned japanese "qr code", and I was off on a storm of wikipedia (http://en.wikipedia.org/wiki/QR_Code) and barely translated api pages (http://trac.koka-in.org/libdecodeqr)
I installed libdecodeqr0 and libdecodeqr-dev from synaptic and began working on the sample application on the api page (http://trac.koka-in.org/libdecodeqr/browser/trunk/src/sample/simple/simpletest.cpp?rev=latest).
From there I had issues getting started because I wasn't sure how to include everything. The api site has:
#include <stdio.h>
#include <highgui.h>
#include "../../libdecodeqr/decodeqr.h"
naturally that had to change.
Highgui is part fo the opencv library, so "whereis opencv" showed me where stuff is. Sure enough, highgui was in there.
did the same for decodeqr.h
#include <stdio>
#include <opencv/highgui.h>
#include "/usr/include/decodeqr.h"
compiling now returned:
~$ g++ ./qrcode.cpp
./qrcode.cpp:1:17: error: stdio: No such file or directory
In file included from ./qrcode.cpp:3:
/usr/include/decodeqr.h:17:16: error: cv.h: No such file or directory
my gut reaction was to go into the decdeqr.h and change it's includes. But this turned into a slippery slop with more and more stuff breaking. So I reinstalled the package from syanptic and tried it's example programs.
$ libdecodeqr-simpletest
OpenCV ERROR: Null pointer (null filename)
in function cvLoadImage, loadsave.cpp(380)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
so apparently this app includes opencv in other areas as well.
my options are now.. try and alter the program to not use openCV at all, or ask for advise.
So here I am.
Things I'd like to do
Learn how one is supposed to include open libraries into programs.
write a program to read in a qr code
fix the libencodeqr-exmaples stuff on my end
know how to make a patch to give to launchpad (I think I know where to find documentation on this)
naturally: thanks in advance.
libdecodeqr-examples sample programs do not work, I think I understand why, but not how to fix it, nor how this is supposed to work in the debian package system.
I'm not sure if it is a "bug" because I would need someone to reproduce it 8-[ .
The longer part
Google has a barcode logo today, and it made me interested in barcode programming. My friend mentioned japanese "qr code", and I was off on a storm of wikipedia (http://en.wikipedia.org/wiki/QR_Code) and barely translated api pages (http://trac.koka-in.org/libdecodeqr)
I installed libdecodeqr0 and libdecodeqr-dev from synaptic and began working on the sample application on the api page (http://trac.koka-in.org/libdecodeqr/browser/trunk/src/sample/simple/simpletest.cpp?rev=latest).
From there I had issues getting started because I wasn't sure how to include everything. The api site has:
#include <stdio.h>
#include <highgui.h>
#include "../../libdecodeqr/decodeqr.h"
naturally that had to change.
Highgui is part fo the opencv library, so "whereis opencv" showed me where stuff is. Sure enough, highgui was in there.
did the same for decodeqr.h
#include <stdio>
#include <opencv/highgui.h>
#include "/usr/include/decodeqr.h"
compiling now returned:
~$ g++ ./qrcode.cpp
./qrcode.cpp:1:17: error: stdio: No such file or directory
In file included from ./qrcode.cpp:3:
/usr/include/decodeqr.h:17:16: error: cv.h: No such file or directory
my gut reaction was to go into the decdeqr.h and change it's includes. But this turned into a slippery slop with more and more stuff breaking. So I reinstalled the package from syanptic and tried it's example programs.
$ libdecodeqr-simpletest
OpenCV ERROR: Null pointer (null filename)
in function cvLoadImage, loadsave.cpp(380)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
so apparently this app includes opencv in other areas as well.
my options are now.. try and alter the program to not use openCV at all, or ask for advise.
So here I am.
Things I'd like to do
Learn how one is supposed to include open libraries into programs.
write a program to read in a qr code
fix the libencodeqr-exmaples stuff on my end
know how to make a patch to give to launchpad (I think I know where to find documentation on this)
naturally: thanks in advance.