c++ - viewing 3D point cloud by integrating custom C API with generic point cloud viewer -
i have tof (time of flight) camera. depth data camera can obtained in xyz format use of c apis, such given below -
xcoordinate = ((int16_t *)xcoordinates)[x + y*xres]; ycoordinate = ((int16_t *)ycoordinates)[x + y*xres]; zcoordinate = ((int16_t *)zcoordinates)[x + y*xres];
i can start infinite while loop keep getting above co-ordinates scene in front of camera. however, visualization purpose 3d point cloud, want use apis provided @ http://pointclouds.org/documentation/tutorials/pcl_visualizer.php
my questions therefore following :
- i able install pcl using precompiled binaries provided here - http://unanancyowen.com/en/pcl18/ . specifically, using vs 2015 (32 bit of course). hence installed pcl-1.8.1rc2-allinone-msvc2017-win32 binary application. using cmake able obtain .sln project sucessfully demo pcl application of cloudviewer (as given here - http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer). linking errors on compiling .sln project using vs 2017. errors appears :
cloud_viewer.obj : error lnk2019: unresolved external symbol "public: bool __thiscall pcl::visualization::pclvisualizer::removeshape(class std::basic_string,class std::allocator > const &,int)" (?removeshape@pclvisualizer@visualization@pcl@@qae_nabv?$basic_string@du?$char_traits@d@std@@v?$allocator@d@2@@std@@h@z) referenced in function "void __cdecl viewerpsycho(class pcl::visualization::pclvisualizer &)"
cloud_viewer.obj : error lnk2019: unresolved external symbol "public: void __thiscall pcl::visualization::pclvisualizer::setbackgroundcolor(double const &,double const &,double const &,int)" (?setbackgroundcolor@pclvisualizer@visualization@pcl@@qaexabn00h@z) referenced in function "void __cdecl vieweroneoff(class pcl::visualization::pclvisualizer &)" (?vieweroneoff@@yaxaavpclvisualizer@visualization@pcl@@@z)
cloud_viewer.obj : error lnk2019: unresolved external symbol "public: bool __thiscall pcl::visualization::pclvisualizer::addtext(class std::basic_string,class std::allocator > const &,int,int,class std::basic_string,class std::allocator > const &,int)"
cloud_viewer.obj : error lnk2019: unresolved external symbol "private: void __thiscall pcl::visualization::pclvisualizer::addactortorenderer(class vtksmartpointer const &,int)" (?addactortorenderer@pclvisualizer@visualization@pcl@@aaexabv?$vtksmartpointer@vvtkprop@@@@h@z) referenced in function "public: bool __thiscall pcl::visualization::pclvisualizer::addsphere(struct pcl::pointxyz const &,double,double,double,double,class std::basic_string,class std::allocator > const &,int)"
cloud_viewer.obj : error lnk2019: unresolved external symbol "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) referenced in function _main cloud_viewer.obj : error lnk2019: unresolved external symbol "public: __thiscall pcl::visualization::cloudviewer::~cloudviewer(void)" (??1cloudviewer@visualization@pcl@@qae@xz) referenced in function _main
cloud_viewer.obj : error lnk2019: unresolved external symbol "public: void __thiscall pcl::visualization::cloudviewer::showcloud(class boost::shared_ptr const > const &,class std::basic_string,class std::allocator > const &)" (?showcloud@cloudviewer@visualization@pcl@@qaexabv?$shared_ptr@$$cbv?$pointcloud@upointxyzrgba@pcl@@@pcl@@@boost@@abv?$basic_string@du?$char_traits@d@std@@v?$allocator@d@2@@std@@@z) referenced in function _main
cloud_viewer.obj : error lnk2019: unresolved external symbol "public: bool __thiscall pcl::visualization::cloudviewer::wasstopped(int)" (?wasstopped@cloudviewer@visualization@pcl@@qae_nh@z) referenced in function _main
- i have xyz data without rgb value. functions pcl must use ?
how must main.cpp file ? similar grabber main mentioned here - http://pointclouds.org/documentation/tutorials/openni_grabber.php
i understand must build own visualstudio project. header files , cpp files pcl library need copy , put in project use?
what additional tools/software must install in addition using selected pcl files (header , cpp) ?
- looks you're not linking pcl visualization lib file , others. in project properties > linker > input > additional dependencies. path pcl lib directory should specified in project properties > vc++ directories > library directories. @ same time path pcl include directory should specified in project properties > vc++ directories > include directories.
- pcl functions , types templated on point type. use
pcl::pointxyz
point type functions. - no. yours more similar simple cloud visualization example in cloudviewer tutorial.
- you don't copy pcl .h , .cpp files solution.
#include
pcl headers remain in installed location, , link in pcl lib files, (see 1 above.) - none. if pcl bin/ directory not in $path place pcl .dlls alongside .exe.
make sure match release libraries release build , debug libraries debug build. make sure you're building either win32 or x64 depending on pre-installed binary installed.
Comments
Post a Comment