From 46cd0e503b4a274ed7da9fff285460a26a9596b8 Mon Sep 17 00:00:00 2001 From: Jeremie Papon Date: Thu, 2 Oct 2014 15:30:15 +0200 Subject: [PATCH] Added flag to paint NaNs as black --- examples/segmentation/example_supervoxels.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/segmentation/example_supervoxels.cpp b/examples/segmentation/example_supervoxels.cpp index bb81734ba1a..246e8ffa895 100644 --- a/examples/segmentation/example_supervoxels.cpp +++ b/examples/segmentation/example_supervoxels.cpp @@ -315,6 +315,8 @@ main (int argc, char ** argv) pcl::io::savePNGFile (refined_out_label_path, *refined_full_labeled_cloud, "label"); //Save RGB from labels pcl::io::PointCloudImageExtractorFromLabelField pcie (pcie.io::PointCloudImageExtractorFromLabelField::COLORS_RGB_GLASBEY); + //We need to set this to account for NAN points in the organized cloud + pcie.setPaintNaNsWithBlack (true); pcl::PCLImage image; pcie.extract (*full_labeled_cloud, image); pcl::io::savePNGFile (out_path, image);