Strange Visualization Behaviour

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Strange Visualization Behaviour

This post was updated on .
I have some strange visualization behaviour with my pointcloud.
The pointcloud is constructed like this:
        cur_vis_pointcloud_ = pcl::PointCloud<pcl::PointXYZRGB>::Ptr(new
        for (int point_index : gt_only_indices_.indices) {
                pcl::PointXYZRGB p = cur_original_pointcloud_->at(point_index);
                p.r = 0;
                p.b = 255;
                p.g = 0;

The cur_original_pointcloud_ contains points which are all coloured in
white, so in the code I take some of them, colour them in blue and add them
to the cur_vis_pointcloud_.

This cur_vis_pointcloud_ is then visualized with the pcl visualizer embedded
in a qt gui (similiar to this tutorial: ). The
strange thing is, that some of the visualized points are coloured in white,
see the first attached image (called in_qt_gui.png). When I write the
cur_vis_pointcloud_ to a .pcd file and visualize it with the pcl_viewer.exe
all points are coloured in blue as expected, see the second attached image
(called in_pcl_viewer.png). Any idea why this happens?

Edit: I just figured out that cur_vis_pointcloud_ is visualized correctly when I make sure that only valid points (where pcl::isFinite returns true) from cur_original_pointcloud_ are added, so basically my problem is solved. Still I don't quite get, why the pointcloud is visualized incorrectly in the gui, but correctly in the pcl_viewer.exe?

Edit2: Okay, finally I found this issue where my problem was already perfectly described:


Sent from:
_______________________________________________ /