Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. libfreenect2 in qt for NVIDIA jetson tk1

libfreenect2 in qt for NVIDIA jetson tk1

Scheduled Pinned Locked Moved Mobile and Embedded
nvidia jetson t
4 Posts 2 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hylie
    wrote on 13 Jul 2015, 13:42 last edited by
    #1

    Good day,
    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?
    Hylie,

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 13 Jul 2015, 21:42 last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hylie
        wrote on 14 Jul 2015, 07:55 last edited by
        #3

        Thank you,

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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 14 Jul 2015, 22:08 last edited by
          #4

          IDE ? Why would you need to build Qt Creator ? Qt should be enough

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          4/4

          14 Jul 2015, 22:08

          • Login

          • Login or register to search.
          4 out of 4
          • First post
            4/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved