cropping the point cloud by changing the origin

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

cropping the point cloud by changing the origin

vj
Hello Everyone,

I am new to PCL and i hope i can find some help here.

Currently i am using CropBox filter to crop a point cloud by giving xyz
boundaries and i think this filter considers 0,0,0 as origin for doing it.

What i want to do is to crop the point cloud considering a different point
as origin. How can this be done?Any suggestions would be appreciated. Thanks
in advance.



--
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: cropping the point cloud by changing the origin

ravijoshi
CropBox filter [1] requires a minimum and maximum points of the box. You need
to set both of them using filter.setMin(Eigen::Vector4f min) and
filter.setMax(Eigen::Vector4f max) functions. You may have a look here [2]
for a working example of CropBox filter.

References:
[1]
http://docs.pointclouds.org/1.7.1/classpcl_1_1_crop_box_3_01pcl_1_1_p_c_l_point_cloud2_01_4.html
[2]
https://github.com/ravijo/point-cloud-visualization/blob/master/src/advance_visualizer.cpp#L62

Cheers!



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

Re: cropping the point cloud by changing the origin

vj
hello,

yes i have implemented the CropBox filter successfully by setting min and
max values.
The point cloud i am cropping from has sensor_origin as 0,0,0,0 so the
filter also considers that point as origin and crops around it based on
given max min values.

but i want to crop it around a different point for example say (1,2,3), not
around my pointcloud's origin. so is it possible change the origin or any
other filter which does this?




--
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: cropping the point cloud by changing the origin

ravijoshi
CropBox is a filter that allows user to filter all the data inside of a given
box [1]. It doesn't matter where your sensor origin is. This filter is going
to remove all the points which are outside given box.

For example: Eigen::Vector4f min(-1, -1, -1, 1) and Eigen::Vector4f max(1,
1, 1, 1) is going to keep only those points which reside in a cube of edge
length equal to 2 units located at the origin (0, 0, 0). You should set
minimum and maximum according to your need.

[1]
http://docs.pointclouds.org/1.7.1/classpcl_1_1_crop_box_3_01pcl_1_1_p_c_l_point_cloud2_01_4.html

-
Cheers



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

Re: cropping the point cloud by changing the origin

vj
Ok understood. It all depends on the min max values then.

Thanks for your help:)



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