libfreenect2 in qt for NVIDIA jetson tk1
Hylie last edited by
I’m working on the NVIDIA Jetson tk1, I followed these instructions to get an example working with the kinectv2. However I want use the libfreenect2 drivers in qt.
In my efforts to do so, I created a new c++ project and edited the .pro to look like:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
LIBS += -L$$PWD/../../../../../usr/local/cuda-6.5/lib/ -lcudart
LIBS += -lopencv_contrib
LIBS += -lopencv_highgui
LIBS += -lopencv_imgproc
LIBS += -lopencv_core
LIBS += -L$$PWD/../../../libfreenect2/examples/protonect/lib/ -lfreenect2
LIBS += -L$$PWD/../../../libfreenect2/examples/protonect/lib/ -lglfw
INCLUDEPATH += $$PWD/../../../libfreenect2/examples/protonect/include
DEPENDPATH += $$PWD/../../../libfreenect2/examples/protonect/include
INCLUDEPATH += $$PWD/../../../../../usr/local/cuda-6.5/include
DEPENDPATH += $$PWD/../../../../../usr/local/cuda-6.5/include
This compiles just fine, runtime i get an error: JPEG parameter struct mismatch: library things size is 488, caller expects 560.
According to multiple sources the problem lies in the incompatible libjpeg.so and libjpeg.so.8
So according to the tips found on tutorial blog I checked the ldd of my working executable (not compiled with qt)
And the ldd of the non-working one.
The working proton
libopenjpeg.so.2 => /usr/lib/arm-linux-gnueabihf/libopenjpeg.so.2 (0xb308b000)
libjpeg.so => /usr/lib/arm-linux-gnueabihf/libjpeg.so (0xb6616000)
libturbojpeg.so.0 => /usr/lib/arm-linux-gnueabihf/libturbojpeg.so.0 (0xb6671000)
The Not working proton:
libopenjpeg.so.2 => /usr/lib/arm-linux-gnueabihf/libopenjpeg.so.2 (0xb2efb000)
libjpeg.so.8 => /usr/lib/arm-linux-gnueabihf/libjpeg.so.8 (0xb6171000)
libjpeg.so => /usr/lib/arm-linux-gnueabihf/tegra/libjpeg.so (0xb654d000)
libturbojpeg.so.0 => /usr/lib/arm-linux-gnueabihf/libturbojpeg.so.0 (0xb65bc000)
Can anybody tell me how to make it so the executable looks for JPEG struct in libjpeg.so instead of libjpeg.so.8?
Hi and welcome to devnet,
You would probably have to build Qt using the libjpeg.so from the tegra subfolder so all elements of your application would only use one common libjpeg.
Hope it helps
Hylie last edited by
I must admit this sounds like somewhat of a challange (never having build my own IDE before).
But i'm more than willing to learn.
I wil report back with my findings (if any).
IDE ? Why would you need to build Qt Creator ? Qt should be enough