vs2012+pcl_1.7.2
1、下载一个vs2012,安装选择32的,因为我们一般建工程的时候是建的win控制平台的工程。
2下载一个PCL-1.7.2-AllInOne-msvc2012-win32 ,下载地址http://www.pclcn.org/bbs/forum.php?mod=viewthread&tid=1090。并安装
3、按照网上配置vs2013+pcl1.7.1的方法配置环境变量,以及在工程里面添加库目录和包含目录。
4、根据这两个博客可以配置好。哦耶加油
4、http://www.cnblogs.com/newpanderking/articles/4022322.html
5、http://blog.csdn.net/lgdnr/article/details/51190685
6、需要的添加配置库
pcl_common_debug.lib
pcl_features_debug.lib
pcl_filters_debug.lib
pcl_io_debug.lib
pcl_io_ply_debug.lib
pcl_kdtree_debug.lib
pcl_keypoints_debug.lib
pcl_ml_debug.lib
pcl_octree_debug.lib
pcl_outofcore_debug.lib
pcl_people_debug.lib
pcl_recognition_debug.lib
pcl_registration_debug.lib
pcl_sample_consensus_debug.lib
pcl_search_debug.lib
pcl_segmentation_debug.lib
pcl_stereo_debug.lib
pcl_surface_debug.lib
pcl_tracking_debug.lib
pcl_visualization_debug.lib
libboost_atomic-vc110-mt-1_55.lib
libboost_atomic-vc110-mt-gd-1_55.lib
libboost_chrono-vc110-mt-1_55.lib
libboost_chrono-vc110-mt-gd-1_55.lib
libboost_context-vc110-mt-1_55.lib
libboost_context-vc110-mt-gd-1_55.lib
libboost_coroutine-vc110-mt-1_55.lib
libboost_coroutine-vc110-mt-gd-1_55.lib
libboost_date_time-vc110-mt-1_55.lib
libboost_date_time-vc110-mt-gd-1_55.lib
libboost_exception-vc110-mt-1_55.lib
libboost_exception-vc110-mt-gd-1_55.lib
libboost_filesystem-vc110-mt-1_55.lib
libboost_filesystem-vc110-mt-gd-1_55.lib
libboost_graph_parallel-vc110-mt-1_55.lib
libboost_graph_parallel-vc110-mt-gd-1_55.lib
libboost_graph-vc110-mt-1_55.lib
libboost_graph-vc110-mt-gd-1_55.lib
libboost_iostreams-vc110-mt-1_55.lib
libboost_iostreams-vc110-mt-gd-1_55.lib
libboost_locale-vc110-mt-1_55.lib
libboost_locale-vc110-mt-gd-1_55.lib
libboost_log_setup-vc110-mt-1_55.lib
libboost_log_setup-vc110-mt-gd-1_55.lib
libboost_log-vc110-mt-1_55.lib
libboost_log-vc110-mt-gd-1_55.lib
libboost_math_c99-vc110-mt-1_55.lib
libboost_math_c99-vc110-mt-gd-1_55.lib
libboost_math_c99f-vc110-mt-1_55.lib
libboost_math_c99f-vc110-mt-gd-1_55.lib
libboost_math_c99l-vc110-mt-1_55.lib
libboost_math_c99l-vc110-mt-gd-1_55.lib
libboost_math_tr1-vc110-mt-1_55.lib
libboost_math_tr1-vc110-mt-gd-1_55.lib
libboost_math_tr1f-vc110-mt-1_55.lib
libboost_math_tr1f-vc110-mt-gd-1_55.lib
libboost_math_tr1l-vc110-mt-1_55.lib
libboost_math_tr1l-vc110-mt-gd-1_55.lib
libboost_mpi-vc110-mt-1_55.lib
libboost_mpi-vc110-mt-gd-1_55.lib
libboost_prg_exec_monitor-vc110-mt-1_55.lib
libboost_prg_exec_monitor-vc110-mt-gd-1_55.lib
libboost_program_options-vc110-mt-1_55.lib
libboost_program_options-vc110-mt-gd-1_55.lib
libboost_random-vc110-mt-1_55.lib
libboost_random-vc110-mt-gd-1_55.lib
libboost_regex-vc110-mt-1_55.lib
libboost_regex-vc110-mt-gd-1_55.lib
libboost_serialization-vc110-mt-1_55.lib
libboost_serialization-vc110-mt-gd-1_55.lib
libboost_signals-vc110-mt-1_55.lib
libboost_signals-vc110-mt-gd-1_55.lib
libboost_system-vc110-mt-gd-1_55.lib
libboost_test_exec_monitor-vc110-mt-1_55.lib
libboost_test_exec_monitor-vc110-mt-gd-1_55.lib
libboost_thread-vc110-mt-gd-1_55.lib
libboost_timer-vc110-mt-1_55.lib
libboost_timer-vc110-mt-gd-1_55.lib
libboost_unit_test_framework-vc110-mt-1_55.lib
libboost_unit_test_framework-vc110-mt-gd-1_55.lib
libboost_wave-vc110-mt-1_55.lib
libboost_wave-vc110-mt-gd-1_55.lib
libboost_wserialization-vc110-mt-1_55.lib
libboost_wserialization-vc110-mt-gd-1_55.lib
flann.lib
flann_cpp_s.lib
flann_cpp_s-gd.lib
flann_s.lib
flann_s-gd.lib
flann-gd.lib
qhull.lib
qhull_d.lib
qhull_p.lib
qhull_p_d.lib
qhullcpp.lib
qhullcpp_d.lib
qhullstatic.lib
qhullstatic_d.lib
qhullstatic_p.lib
qhullstatic_p_d.lib
vtkalglib.lib
vtkalglib-gd.lib
vtkCharts.lib
vtkCharts-gd.lib
vtkCommon.lib
vtkCommon-gd.lib
vtkDICOMParser.lib
vtkDICOMParser-gd.lib
vtkexoIIc.lib
vtkexoIIc-gd.lib
vtkexpat.lib
vtkexpat-gd.lib
vtkFiltering.lib
vtkFiltering-gd.lib
vtkfreetype.lib
vtkfreetype-gd.lib
vtkftgl.lib
vtkftgl-gd.lib
vtkGenericFiltering.lib
vtkGenericFiltering-gd.lib
vtkGeovis.lib
vtkGeovis-gd.lib
vtkGraphics.lib
vtkGraphics-gd.lib
vtkhdf5.lib
vtkhdf5_hl.lib
vtkhdf5_hl-gd.lib
vtkhdf5-gd.lib
vtkHybrid.lib
vtkHybrid-gd.lib
vtkImaging.lib
vtkImaging-gd.lib
vtkInfovis.lib
vtkInfovis-gd.lib
vtkIO.lib
vtkIO-gd.lib
vtkjpeg.lib
vtkjpeg-gd.lib
vtklibxml2.lib
vtklibxml2-gd.lib
vtkmetaio.lib
vtkmetaio-gd.lib
vtkNetCDF.lib
vtkNetCDF_cxx.lib
vtkNetCDF_cxx-gd.lib
vtkNetCDF-gd.lib
vtkpng.lib
vtkpng-gd.lib
vtkproj4.lib
vtkproj4-gd.lib
vtkRendering.lib
vtkRendering-gd.lib
vtksqlite.lib
vtksqlite-gd.lib
vtksys.lib
vtksys-gd.lib
vtktiff.lib
vtktiff-gd.lib
vtkverdict.lib
vtkverdict-gd.lib
vtkViews-gd.lib
vtkViews.lib
vtkVolumeRendering.lib
vtkVolumeRendering-gd.lib
vtkWidgets.lib
vtkWidgets-gd.lib
vtkzlib.lib
vtkzlib-gd.lib
7、测试代码
#include <pcl/visualization/cloud_viewer.h>
#include <iostream>
#include <pcl/io/io.h>
#include <pcl/io/pcd_io.h>
int user_data;
void viewerOneOff(pcl::visualization::PCLVisualizer& viewer)
{
viewer.setBackgroundColor(1.0, 0.5, 1.0);
pcl::PointXYZ o;
o.x = 1.0;
o.y = 0;
o.z = 0;
viewer.addSphere(o, 0.25, "sphere", 0);
std::cout << "i only run once" << std::endl;
}
void viewerPsycho(pcl::visualization::PCLVisualizer& viewer)
{
static unsigned count = 0;
std::stringstream ss;
ss << "Once per viewer loop: " << count++;
viewer.removeShape("text", 0);
viewer.addText(ss.str(), 200, 300, "text", 0);
//FIXME: possible race condition here:
user_data++;
}
int main()
{
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>);
pcl::io::loadPCDFile("example.pcdµÄλÖÃ", *cloud);
pcl::visualization::CloudViewer viewer("Cloud Viewer");
//blocks until the cloud is actually rendered
viewer.showCloud(cloud);
//use the following functions to get access to the underlying more advanced/powerful
//PCLVisualizer
//This will only get called once
viewer.runOnVisualizationThreadOnce(viewerOneOff);
//This will get called once per visualization iteration
viewer.runOnVisualizationThread(viewerPsycho);
while (!viewer.wasStopped())
{
//you can also do cool processing here
//FIXME: Note that this is running in a separate thread from viewerPsycho
//and you should guard against race conditions yourself...
user_data++;
}
return 0;
}
7、亲测有效欢迎大家来交流鄙人邮箱:757860682@qq.com