viewing 3D point cloud using APIs by Open source PCL
Asked Answered
B

1

0

I use a ToF (Time of Flight) camera to obtain depth data in XYZ format.

For visualization purpose as a 3D point cloud, I want to use the APIs provided by open source PCL mentioned at http://pointclouds.org/documentation/tutorials/pcl_visualizer.php

What is a good starter tutoarial example (.cpp) file to look at in order to construct a point cloud GUI running in a separate display thread ?

Bort answered 25/7, 2017 at 10:44 Comment(6)
I was doing something similar 3 years ago with older PCL. Please, look here for the example code: bitbucket.org/Logrus/cv-project/src/…Button
Thank you for the reference code. It seems you built your application on a Linux platform. I am building it on Windows platform. Hence I would like to know if I need to install PCL or can I just obtain the prebuilt dll libraries and header files from the website of pointclouds.org ?Bort
You can obtain pre-built version. Unfortunately I don't have a windows system with PCL right now, so I am not sure how hard it is. But it should be manageable by following the official instructions. Somebody put together video instructions about how to work with PCL+CMake on windows: youtube.com/watch?v=jcBVzAnrH70 Hopefully they are helpful enough.Button
I am able to use cmake to compile the pcl1.8.1 using the Cmakelists.txt file at the demo project of cloudviewer. However, I get linking errors on building the .sln solution in VS2017. Any idea on what could be going wrong ?Bort
wow, downvote to my question. great. something accomplished today.Bort
Possible duplicate of Point Cloud Library with Visual Studio 2017Bort
R
1
  1. Looks like you're not linking the PCL visualization lib file and probably others. Do this in the project properties > Linker > Input > Additional Dependencies. The path to your PCL lib directory should be specified in Project properties > VC++ Directories > Library Directories. At the same time the path to your PCL include directory should be specified in Project properties > VC++ Directories > Include Directories.
  2. PCL functions and types are templated on the point type. So you will use pcl::PointXYZ as the point type for all functions.
  3. No. Yours will be more similar to the Simple Cloud Visualization example in the CloudViewer tutorial.
  4. You don't copy the PCL .h and .cpp files into your solution. You #include the PCL headers that remain in their installed location, and you link in the PCL lib files, (see 1 above.)
  5. None. If the PCL bin/ directory is not in your $PATH then place the PCL .dlls alongside your .exe.

Make sure you match release libraries with a release build and debug libraries with a debug build. Make sure you're building either for Win32 or x64 depending on which pre-installed binary you installed.

Ruhl answered 27/7, 2017 at 14:26 Comment(2)
Looking back of some of my downvoted questions I could not truly understand the downvote on my question. I was able to convey my precise programming problem and thanks to your answer (and also Jan Murakami's comments), I was able to progress on resolving the problem. I assume that the question was too long or not properly frame. Any ideas on how I can "beautify" the question ?Bort
@Bort If I were to guess, the downvote would have been because the introductory paragraph and code snippet have no relevance to the questions and needn't be there at all. And then the questions are all of the form "how do I get a working PCL build environment up and running" which could be considered too broad for SO.Ruhl

© 2022 - 2024 — McMap. All rights reserved.