void addCoordinateSystem(double scale, const Affine3f& t, const String &id = "coordinate");
void showPointCloud(const String& id, InputArray cloud, InputArray colors, const Affine3f& pose = Affine3f::Identity());
+ void showPointCloud(const String& id, InputArray cloud, const Color& color, const Affine3f& pose = Affine3f::Identity());
bool addPointCloudNormals (const Mat &cloud, const Mat& normals, int level = 100, float scale = 0.02f, const String &id = "cloud");
* \param[in] pose transform to be applied on the point cloud
*/
void showPointCloud(const String& id, InputArray cloud, InputArray colors, const Affine3f& pose = Affine3f::Identity());
+ void showPointCloud(const String& id, InputArray cloud, const Color& color, const Affine3f& pose = Affine3f::Identity());
bool addPolygonMesh (const Mesh3d& mesh, const cv::Mat& mask, const std::string &id = "polygon");
bool updatePolygonMesh (const Mesh3d& mesh, const cv::Mat& mask, const std::string &id = "polygon");
impl_->showPointCloud(id, cloud, colors, pose);
}
+void temp_viz::Viz3d::showPointCloud(const String& id, InputArray cloud, const Color& color, const Affine3f& pose)
+{
+ impl_->showPointCloud(id, cloud, color, pose);
+}
+
bool temp_viz::Viz3d::addPointCloudNormals (const Mat &cloud, const Mat& normals, int level, float scale, const String& id)
{
return impl_->addPointCloudNormals(cloud, normals, level, scale, id);
vtkSmartPointer<vtkIdTypeArray> cells = vertices->GetData ();
if (exist)
- updateCells(cells, initcells, nr_points);
+ updateCells (cells, initcells, nr_points);
else
updateCells (cells, am_it->second.cells, nr_points);
}
}
+void temp_viz::Viz3d::VizImpl::showPointCloud(const String& id, InputArray _cloud, const Color& color, const Affine3f& pose)
+{
+ // Generate an array of colors from single color
+ Mat colors(_cloud.size(), CV_8UC3, color);
+ showPointCloud(id, _cloud, colors, pose);
+}
+
bool temp_viz::Viz3d::VizImpl::addPointCloudNormals (const cv::Mat &cloud, const cv::Mat& normals, int level, float scale, const std::string &id)
{
CV_Assert(cloud.size() == normals.size() && cloud.type() == CV_32FC3 && normals.type() == CV_32FC3);