
【遇到的問題】
我處理同一個點云后生成了不同部分的點云塊,想批量定義不同的顏色并顯示。
上圖是我自己測驗的demo,根據目前查到的好像PCL里想自定義顯示點云顏色只能用PCLvisualizer,那在addPointCloud里的顏色引數
pcl::visualization::PointCloudColorHandlerCustom<PointT>好像只能定義的時候就賦值,即:pcl::visualization::PointCloudColorHandlerCustom<PointT> pch(pc[0], 255, 0, 0);
pc[0]是我批量讀取的第一個點云塊,然后我把pch壓入vector中。另一個點云塊想用綠色,
pch->PointCloudColorHandlerCustom(pc[1], 0, 0, 255);
然后就報錯C2819 "pcl::visualization::PointCloudColorHandlerCustom<PointT>”型別沒有多載成員“operator ->”。
【需求】
想請問大佬們怎么解決這個錯誤,不會要自己去改PCL類的定義加多載吧?或者有沒有其他方法能批量顯示點云及自定義其顏色?謝謝
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/269693.html
標籤:機器視覺
上一篇:springboot是否可以指定application.yml檔案的路徑來進行加載
下一篇:元組賦值
