|
| |
FrustumCulling (bool extract_removed_indices=false) |
| void |
setCameraPose (const Eigen::Matrix4f &camera_pose) |
| |
Set the pose of the camera w.r.t the origin. More...
|
| Eigen::Matrix4f |
getCameraPose () const |
| |
Get the pose of the camera w.r.t the origin. More...
|
| void |
setHorizontalFOV (float hfov) |
| |
Set the horizontal field of view for the camera in degrees. More...
|
| void |
setHorizontalFOV (float fov_left_bound, float fov_right_bound) |
| |
Set the horizontal field of view for the camera in degrees. More...
|
| float |
getHorizontalFOV () const |
| |
Get the horizontal field of view for the camera in degrees. More...
|
| void |
getHorizontalFOV (float &fov_left_bound, float &fov_right_bound) const |
| |
Get the horizontal field of view for the camera in degrees. More...
|
| void |
setVerticalFOV (float vfov) |
| |
Set the vertical field of view for the camera in degrees. More...
|
| void |
setVerticalFOV (float fov_lower_bound, float fov_upper_bound) |
| |
Set the vertical field of view for the camera in degrees. More...
|
| float |
getVerticalFOV () const |
| |
Get the vertical field of view for the camera in degrees. More...
|
| void |
getVerticalFOV (float &fov_lower_bound, float &fov_upper_bound) const |
| |
Get the vertical field of view for the camera in degrees. More...
|
| void |
setNearPlaneDistance (float np_dist) |
| |
Set the near plane distance. More...
|
| float |
getNearPlaneDistance () const |
| |
Get the near plane distance. More...
|
| void |
setFarPlaneDistance (float fp_dist) |
| |
Set the far plane distance. More...
|
| float |
getFarPlaneDistance () const |
| |
Get the far plane distance. More...
|
| void |
setRegionOfInterest (float roi_x, float roi_y, float roi_w, float roi_h) |
| |
Set the region of interest (ROI) in normalized values. More...
|
| void |
getRegionOfInterest (float &roi_x, float &roi_y, float &roi_w, float &roi_h) const |
| |
Get the region of interest (ROI) in normalized values. More...
|
| |
FilterIndices (bool extract_removed_indices=false) |
| |
Constructor. More...
|
| void |
filter (Indices &indices) |
| |
Calls the filtering method and returns the filtered point cloud indices. More...
|
| void |
setNegative (bool negative) |
| |
Set whether the regular conditions for points filtering should apply, or the inverted conditions. More...
|
| bool |
getNegative () const |
| |
Get whether the regular conditions for points filtering should apply, or the inverted conditions. More...
|
| void |
setKeepOrganized (bool keep_organized) |
| |
Set whether the filtered points should be kept and set to the value given through setUserFilterValue (default: NaN), or removed from the PointCloud, thus potentially breaking its organized structure. More...
|
| bool |
getKeepOrganized () const |
| |
Get whether the filtered points should be kept and set to the value given through setUserFilterValue (default = NaN), or removed from the PointCloud, thus potentially breaking its organized structure. More...
|
| void |
setUserFilterValue (float value) |
| |
Provide a value that the filtered points should be set to instead of removing them. More...
|
| |
Filter (bool extract_removed_indices=false) |
| |
Empty constructor. More...
|
|
IndicesConstPtr const |
getRemovedIndices () const |
| |
Get the point indices being removed. More...
|
| void |
getRemovedIndices (PointIndices &pi) |
| |
Get the point indices being removed. More...
|
| void |
filter (PointCloud &output) |
| |
Calls the filtering method and returns the filtered dataset in output. More...
|
| |
PCLBase () |
| |
Empty constructor. More...
|
| |
PCLBase (const PCLBase &base) |
| |
Copy constructor. More...
|
| virtual |
~PCLBase ()=default |
| |
Destructor. More...
|
| virtual void |
setInputCloud (const PointCloudConstPtr &cloud) |
| |
Provide a pointer to the input dataset. More...
|
|
PointCloudConstPtr const |
getInputCloud () const |
| |
Get a pointer to the input point cloud dataset. More...
|
| virtual void |
setIndices (const IndicesPtr &indices) |
| |
Provide a pointer to the vector of indices that represents the input data. More...
|
| virtual void |
setIndices (const IndicesConstPtr &indices) |
| |
Provide a pointer to the vector of indices that represents the input data. More...
|
| virtual void |
setIndices (const PointIndicesConstPtr &indices) |
| |
Provide a pointer to the vector of indices that represents the input data. More...
|
| virtual void |
setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols) |
| |
Set the indices for the points laying within an interest region of the point cloud. More...
|
|
IndicesPtr |
getIndices () |
| |
Get a pointer to the vector of indices used. More...
|
|
IndicesConstPtr const |
getIndices () const |
| |
Get a pointer to the vector of indices used. More...
|
| const PointT & |
operator[] (std::size_t pos) const |
| |
Override PointCloud operator[] to shorten code. More...
|
template<typename PointT>
class pcl::FrustumCulling< PointT >
FrustumCulling filters points inside a frustum given by pose and field of view of the camera.
Code example:
pcl::PointCloud <pcl::PointXYZ>::Ptr source;
// .. read or fill the source cloud
pcl::FrustumCulling<pcl::PointXYZ> fc;
fc.setInputCloud (source);
fc.setVerticalFOV (45);
fc.setHorizontalFOV (60);
fc.setNearPlaneDistance (5.0);
fc.setFarPlaneDistance (15);
Eigen::Matrix4f camera_pose;
// .. read or input the camera pose from a registration algorithm.
fc.setCameraPose (camera_pose);
pcl::PointCloud <pcl::PointXYZ> target;
fc.filter (target);
pcl::FilterIndices::filtervoid filter(Indices &indices)Calls the filtering method and returns the filtered point cloud indices.Definition: filter_indices.h:100
pcl::FilterIndices::filter
void filter(Indices &indices)
Calls the filtering method and returns the filtered point cloud indices.
Definition: filter_indices.h:100
pcl::FrustumCullingFrustumCulling filters points inside a frustum given by pose and field of view of the camera.Definition: frustum_culling.h:77
pcl::FrustumCulling
FrustumCulling filters points inside a frustum given by pose and field of view of the camera.
Definition: frustum_culling.h:77
pcl::FrustumCulling::setNearPlaneDistancevoid setNearPlaneDistance(float np_dist)Set the near plane distance.Definition: frustum_culling.h:252
pcl::FrustumCulling::setNearPlaneDistance
void setNearPlaneDistance(float np_dist)
Set the near plane distance.
Definition: frustum_culling.h:252
pcl::FrustumCulling::setVerticalFOVvoid setVerticalFOV(float vfov)Set the vertical field of view for the camera in degrees.Definition: frustum_culling.h:193
pcl::FrustumCulling::setVerticalFOV
void setVerticalFOV(float vfov)
Set the vertical field of view for the camera in degrees.
Definition: frustum_culling.h:193
pcl::FrustumCulling::setFarPlaneDistancevoid setFarPlaneDistance(float fp_dist)Set the far plane distance.Definition: frustum_culling.h:274
pcl::FrustumCulling::setFarPlaneDistance
void setFarPlaneDistance(float fp_dist)
Set the far plane distance.
Definition: frustum_culling.h:274
pcl::FrustumCulling::setHorizontalFOVvoid setHorizontalFOV(float hfov)Set the horizontal field of view for the camera in degrees.Definition: frustum_culling.h:133
pcl::FrustumCulling::setHorizontalFOV
void setHorizontalFOV(float hfov)
Set the horizontal field of view for the camera in degrees.
Definition: frustum_culling.h:133
pcl::FrustumCulling::setCameraPosevoid setCameraPose(const Eigen::Matrix4f &camera_pose)Set the pose of the camera w.r.t the origin.Definition: frustum_culling.h:116
pcl::FrustumCulling::setCameraPose
void setCameraPose(const Eigen::Matrix4f &camera_pose)
Set the pose of the camera w.r.t the origin.
Definition: frustum_culling.h:116
pcl::PCLBase::setInputCloudvirtual void setInputCloud(const PointCloudConstPtr &cloud)Provide a pointer to the input dataset.Definition: pcl_base.hpp:65
pcl::PCLBase::setInputCloud
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
Definition: pcl_base.hpp:65
pcl::PointCloud< pcl::PointXYZ >
pcl::PointCloud< pcl::PointXYZ >
pcl::PointCloud::Ptrshared_ptr< PointCloud< PointT > > PtrDefinition: point_cloud.h:413
pcl::PointCloud::Ptr
shared_ptr< PointCloud< PointT > > Ptr
Definition: point_cloud.h:413
- Author
- Aravindhan K Krishnan
Definition at line 76 of file frustum_culling.h.
template<typename PointT >
Set the pose of the camera w.r.t the origin.
- Parameters
-
| [in] |
camera_pose |
the camera pose |
Note: This assumes a coordinate system where X is forward, Y is up, and Z is right. To convert from the traditional camera coordinate system (X right, Y down, Z forward), one can use:
Eigen::Matrix4f pose_orig = //pose in camera coordinates
Eigen::Matrix4f cam2robot;
cam2robot << 0, 0, 1, 0
0,-1, 0, 0
1, 0, 0, 0
0, 0, 0, 1;
Eigen::Matrix4f pose_new = pose_orig * cam2robot;
fc.setCameraPose (pose_new);
Definition at line 116 of file frustum_culling.h.