kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Qt GUI for PCL (OpenNI) Kinect stream

Klemen
Active Participant

Hello,

I have been losing my sleep for the last couple of days trying to get the PCL and Qt working together. And also some additional time to get the Kinect stream/visualization up and running. The result can be seen below in Video 1 where a simple Qt GUI is used to show the Kinect point cloud in real-time with some additional controls to process the data.


Video 1. Qt GUI for Kinect real-time stream visualization.

Video link: https://www.youtube.com/watch?v=_sM5ZMJ0XGA


In order the get the PCL working in Qt, I've made the following steps (tested on x86, Win 7 architecture):

  1. Install binaries PCL 1.6.0 (MSVC 2010) all-in-one (http://pointclouds.org/downloads/windows.html),
  2. install Qt 4.8.0 and Qt creator (https://www.qt.io/download-open-source/),
  3. install Vtk 5.8.0 with Qt support,
  4. install Cmake (http://www.cmake.org/)
  5. follow the instructions to configure and build the project here: http://pointclouds.org/documentation/tutorials/qt_visualizer.php. After trying a lot of other approaches, only this worked. Use the source code and provided CMakeLists.txt,
  6. if you get missing libraries for any dependencies, open CMakeCache.txt in the build directory and manually add the path to the libraries (replace all "NOT FOUND" with appropriate paths, e.g. "C:/Program Files (x86)/PCL 1.6.0/3rdParty/Boost/lib"),
  7. run Cmake from Qt again (see step 5),
  8. open MSVC 2010 and build the project.

Your project should build sucessfully. Note that in the debug version, the frame rate is ~4 Hz, while in release version, the frame rate is ~30 Hz (@ VGA resolution).

If you want to upgrade the GUI, I suggest opening the .pro file in Qt creator, modify and repeat the build process.

The source code is in the attachment. There are two additional files (cloudData.h and cloudData.cpp) that you need to include in your MSVC 2010 project (or your CMakeLists.txt) in order to build the code sucessfully.

Post any comments below.

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Comments
alexderjuengere
Active Participant

Is it intended that the attached youtube-video is labeled as "privat"?

Klemen
Active Participant

Thanks for pointing this out. I've corrected this.

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."