我有一个ToF(飞行时间)摄像头。从相机的深度数据可在XYZ格式通过使用一定C API,如下面给出的获得 -通过将自定义C API与通用点云查看器集成来查看3D点云
xCoordinate = ((int16_t *)xCoordinates)[x + y*xRes];
yCoordinate = ((int16_t *)yCoordinates)[x + y*xRes];
zCoordinate = ((int16_t *)zCoordinates)[x + y*xRes];
我可以启动一个无限while循环,以保持从前方的场景获得上述坐标的相机。 然而,对于可视化的目的为三维点云,我想用在http://pointclouds.org/documentation/tutorials/pcl_visualizer.php
我的问题提供的API,因此有以下几种:
- 我能够通过使用预编译的二进制文件成功安装PCL这里提供 - http://unanancyowen.com/en/pcl18/。具体来说,我使用VS 2015(当然是32位)。因此,我安装了PCL-1.8.1rc2-AllInOne-msvc2017-win32二进制应用程序。使用cmake我能够成功获得一个.sln项目,用于cloudviewer的演示pcl应用程序(如此处所示 - http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer)。但是我得到的编译使用VS 2017的错误出现在项目的.sln一些链接错误是:
cloud_viewer.obj:错误LNK2019:无法解析的外部符号“市民:布尔__thiscall PCL ::可视化: :PCLVisualizer :: removeShape(类 std :: basic_string,类 std :: allocator> const &,int)“ (?removeShape @ PCLVisualizer @ visualization @ pcl @@ QAE_NABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V $ $ allocator @ D @ 2 @@ std @@ H @ Z)在函数“void __cdecl viewerPsycho(class pcl :: visualization :: PCLVisualizer &)”
cloud_viewer.obj:错误LNK2019:解析外部符号 “公共:无效__thiscall PCL ::可视化:: PCLVisualizer :: setBackgroundColor(双常量 &,双常量&,双常量&,INT)” (? setBackgroundColor @ PCLVisualizer @可视化@ PCL @@ QAEXABN00H @ Z) 函数引用 “无效__cdecl viewerOneOff(类 PCL ::可视化:: PCLVisualizer &)” (?viewerOneOff @@ YAXAAVPCLVisualizer @可视化@ PCL @@@ Z)
cloud_viewer.obj:错误LNK2019:无法解析的外部符号“公共:布尔__thiscall PCL ::可视化:: PCLVisualizer :: addText(类 的std :: basic_string的,类 的std ::分配器>常量&,INT,INT,类 的std :: basic_string的,类 STD: :分配器>常量&,INT)”
cloud_viewer.obj:错误LNK2019:解析外部符号 “私人:无效__thiscall PCL ::可视化:: PCLVisualizer :: addActorToRenderer(类 vtkSmartPointer常量&,INT)” (?addActorToRenderer @ PCLVisualizer @ visualization @ pcl @@ AAEXABV?$ vtkSmartPointer @ VvtkProp @@@@ H @ Z) 在函数中引用“public:bool __thiscall pcl :: visualization :: PCLVisualizer :: addSphere(pcl :: PointXYZ const , )“
cloud_viewer。obj:error LNK2019:无法解析的外部符号“public:__thiscall pcl :: visualization :: CloudViewer :: CloudViewer(class std :: basic_string,class std :: allocator> const &)” (?? 0CloudViewer @ visualization @ pcl @@ QAE @ ABV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@@ Z) 在函数_main中引用 cloud_viewer.obj:错误LNK2019:无法解析的外部符号 “公共:__thiscall PCL ::可视化:: CloudViewer ::〜CloudViewer(无效)” (?? 1CloudViewer @ @可视PCL @@ @ QAE XZ)在功能 引用_main
cloud_viewer.obj:错误LNK2019:无法解析的外部符号“public:void __ thiscall PCL ::可视化:: CloudViewer :: showCloud(类 的boost :: shared_ptr的 常量>常量&,一流的std :: basic_string的,一流的std ::分配器>常量&)” (?showCloud @ CloudViewer @可视化@ PCL @@ QAEXABV?$ @的shared_ptr $$ CBV?$ @点云@ UPointXYZRGBA PCL @@@ PCL @@@提振@@ ABV?$ @的basic_string杜?$ @ char_traits @ d @@性病V'$ @分配器@ d 2 @@ STD @@@ Z) 在函数引用_main
cloud_viewer.obj:错误LNK2019:解析外部符号 “公共:布尔__thiscall PCL ::可视化:: CloudViewer :: wasStopped(INT)” ( ?wasStopped @ CloudViewer @ visualization @ pcl @@ QAE_NH @ Z)在中引用函数_main
- 我只有XYZ数据没有任何RGB值。我必须使用PCL的哪些功能?
我的main.cpp文件必须如何? 是否与此处提到的抓取器主类似 - http://pointclouds.org/documentation/tutorials/openni_grabber.php
我知道我必须构建自己的VisualStudio项目。哪些来自pcl库的头文件和cpp文件我需要复制并放入我的项目中使用?
除了使用选定的PCL文件(标题和cpp)之外,还必须安装哪些附加工具/软件?
3年前,我和老年人PCL做了类似的事情。请查看示例代码:https://bitbucket.org/Logrus/cv-project/src/dbcb87218a0976bb4312403ee34ec53a87e37540?at=master –
感谢您的参考代码。看起来你是在Linux平台上构建你的应用程序的。我正在Windows平台上构建它。因此,我想知道是否需要安装PCL,还是只能从pointclouds.org的网站获取预编译的dll库和头文件? –
您可以获得预建版本。不幸的是,我现在没有PCL的Windows系统,所以我不确定它有多难。但它应该可以通过遵循官方指示来管理。有人将关于如何在Windows上使用PCL + CMake的视频指令放在一起:https://www.youtube.com/watch?v = jcBVzAnrH70希望它们足够有用。 –