PCL demo運行

在VS項目屬性中配置好PCL的環境(include所有部件的include目錄,lib所有部件的lib目錄,再將lib名複製進入鏈接器-輸入-附加依賴項中)之後,寫下如下代碼:

#include <iostream>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/io/pcd_io.h>

int main(int argc, char* argv[]) {
	pcl::PointCloud<pcl::PointXYZRGB>::ConstPtr cloud(new pcl::PointCloud<pcl::PointXYZRGB>);
	pcl::visualization::CloudViewer viewer("Simple Cloud Viewer");
	viewer.showCloud(cloud);
	while(!viewer.wasStopped()){}
	return 0;
}

項目屬性頁-C/C++-預處理器-預處理器定義寫上"_CRT_SECURE_NO_WARNINGS"

C/C++-常規-SDL檢查選擇“否”(防止'vtkMapper::ImmediateModeRenderingOff': 被聲明爲已否決的報錯)

運行可得如下結果:

萌新,啥也不懂,就這樣截圖了。

參考鏈接:

error C4996: 'vtkMapper::ImmediateModeRenderingOff':

Ubuntu16.04下PCL點雲庫的安裝及使用demo

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章