You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I make intensity value histograms inside my UI. Some clouds have an artificial value of 120 for every point, so the vector I pass to the plotter contains only 120. This crashes my program. I make a workaround and add 0 and 255 (one is enough), which doesnt has a visible effect to the plot. But comment the lines out where I add those values and it will crash. Most likely this wont happen to many users, as in natural data this will never happen...
#include<iostream>
#include<pcl/visualization/pcl_plotter.h>intmain ( int argc, char** argv ) {
pcl::visualization::PCLPlotter * plotter = new pcl::visualization::PCLPlotter;
std::vector
<double> data_vec;
for(int i = 0; i < 1000; ++i)
{
data_vec.push_back(120);
}
data_vec.push_back(0);
data_vec.push_back(255);
plotter->addHistogramData ( data_vec, 256 );
plotter->spin();
}
The text was updated successfully, but these errors were encountered:
The problem is very simple to solve; if you want to learn how to fix things in PCL this is the perfect opportunity.
1. Use a debugger to find where the program crashes
Follow this tutorial and debug your program. The PCL version you are linking to must have been compiled in Debug mode. You also need to set CMAKE_BUILD_TYPE to Debug
Hello
I make intensity value histograms inside my UI. Some clouds have an artificial value of 120 for every point, so the vector I pass to the plotter contains only 120. This crashes my program. I make a workaround and add 0 and 255 (one is enough), which doesnt has a visible effect to the plot. But comment the lines out where I add those values and it will crash. Most likely this wont happen to many users, as in natural data this will never happen...
The text was updated successfully, but these errors were encountered: