pcl::PassThrough returns unordered cloud?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pcl::PassThrough returns unordered cloud?

Dr. krank
Hi,

For example :

cout << "width: " << cloud->width << ", " << "height: " << cloud->height <<
endl;  // 512*424

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud_filtered_x (new
pcl::PointCloud<pcl::PointXYZRGBA>);
cloud_filtered_x->points.resize(cloud->width * cloud->height);
cloud_filtered_x->height = cloud->height;
cloud_filtered_x->width = cloud->width;

cout << "width: " << cloud_filtered_x->width << ", " << "height: " <<
cloud_filtered_x->height << endl; // 512*424

pcl::PassThrough<pcl::PointXYZRGBA> passx;
passx.setInputCloud (cloud);
passx.setFilterFieldName ("x");
passx.setFilterLimits (minPerson[0], maxPerson[0]);
passx.setFilterLimitsNegative (false);
passx.filter (*cloud_filtered_x);

cout << "width: " << cloud_filtered_x->width << ", " << "height: " <<
cloud_filtered_x->height << endl; // 5600*1

So my question is, what should I do to get the right dimensions?



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: pcl::PassThrough returns unordered cloud?

Sérgio Agostinho
Set "keepOrganized" to true. More info here 


http://docs.pointclouds.org/trunk/classpcl_1_1_filter_indices.html#a21eb00357056c0cc432cd03afa84d08c

Cheers

--

On Thursday, Feb 01, 2018 at 7:12 PM, therealmp <[hidden email]> wrote:
Hi,

For example :

cout << "width: " << cloud->width << ", " << "height: " << cloud->height <<
endl; // 512*424

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud_filtered_x (new
pcl::PointCloud<pcl::PointXYZRGBA>);
cloud_filtered_x->points.resize(cloud->width * cloud->height);
cloud_filtered_x->height = cloud->height;
cloud_filtered_x->width = cloud->width;

cout << "width: " << cloud_filtered_x->width << ", " << "height: " <<
cloud_filtered_x->height << endl; // 512*424

pcl::PassThrough<pcl::PointXYZRGBA> passx;
passx.setInputCloud (cloud);
passx.setFilterFieldName ("x");
passx.setFilterLimits (minPerson[0], maxPerson[0]);
passx.setFilterLimitsNegative (false);
passx.filter (*cloud_filtered_x);

cout << "width: " << cloud_filtered_x->width << ", " << "height: " <<
cloud_filtered_x->height << endl; // 5600*1

So my question is, what should I do to get the right dimensions?



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (882 bytes) Download Attachment