65 if (filteringType ==
LEFT) {
67 }
else if (filteringType ==
RIGHT) {
69 }
else if (filteringType ==
BOTH) {
79 indicesPtr =
IndicesPtr(
new Indices(leftIndicesPtr->size() + rightIndicesPtr->size()));
81 std::merge(leftIndicesPtr->begin(), leftIndicesPtr->end(), rightIndicesPtr->begin(), rightIndicesPtr->end(), indicesPtr->begin());
84 std::sort(indicesPtr->begin(), indicesPtr->end());
85 Indices::iterator uniqueEndIterator = std::unique(indicesPtr->begin(), indicesPtr->end());
88 indicesPtr->resize(std::distance(indicesPtr->begin(), uniqueEndIterator));
130 viz::MarkerArrayPtr markerArrayPtr = viz::MarkerArrayPtr(
new viz::MarkerArray());
131 markerArrayPtr->markers = std::vector<viz::Marker>(leftMarkerArrayPtr->markers.size() + rightMarkerArrayPtr->markers.size());
132 std::copy(leftMarkerArrayPtr->markers.begin(), leftMarkerArrayPtr->markers.end(), markerArrayPtr->markers.begin());
133 std::copy(rightMarkerArrayPtr->markers.begin(), rightMarkerArrayPtr->markers.end(), markerArrayPtr->markers.begin() + leftMarkerArrayPtr->markers.size());
135 return markerArrayPtr;
SingleCameraModelFilter mRightCameraModelFilter
the right camera model filter.
void setRightCameraPivotPointOffset(const SimpleVector3 &cameraPivotPointOffset)
sets the left camera pivot offset
void setOrientation(const SimpleQuaternion &orientation)
sets the orientation of the pivot point
FilteringType getFilteringType()
void setPivotPointPosition(const SimpleVector3 &position)
sets the position of the pivot point.
StereoCameraModelFilter(const SimpleVector3 &leftCameraPivotPointOffset=SimpleVector3(), const SimpleVector3 &rightCameraPivotPointOffset=SimpleVector3())
constructor for the StereoCameraModelFilter object
FilteringType mFilteringType
the filtering type.
void setFarClippingPlane(double fcp)
sets the far clipping plane. fcp the far clipping distance
SimpleVector3 getLeftCameraPivotPointOffset()
SimpleVector3 getPivotPointPosition()
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
SimpleVector3 getRightCameraPivotPointOffset()
void setNearClippingPlane(double ncp)
sets the near clipping plane.
virtual ObjectPointCloudPtr & getInputCloud()
SimpleVector3 getPivotPointOffset()
void filter(IndicesPtr &indicesPtr)
Applies the filter on the indices.
viz::MarkerArrayPtr getVisualizationMarkerArray(uint32_t &sequence, double lifetime=30.0)
returns a array of markers containing the visualization of the camera frustum.
double getHorizontalFOV()
std::vector< int > Indices
virtual void setIndices(const IndicesPtr &indicesPtr)
setting the shared pointer to the active indices of the point cloud.
double getNearClippingPlane()
SingleCameraModelFilter mLeftCameraModelFilter
the left camera model filter.
void doFiltering(IndicesPtr &indicesPtr)
Does the filtering on the indices.
this namespace contains all generally usable classes.
viz::MarkerArrayPtr getVisualizationMarkerArray(uint32_t &sequence, double lifetime=30.0)
returns a array of markers containing the visualization of the camera frustum.
boost::shared_ptr< Indices > IndicesPtr
CameraModelFilter class was built to generalize the filtering for different camera models...
SimpleQuaternion getOrientation()
FilteringType
describes the filtering type of the filter.
void setLeftCameraPivotPointOffset(const SimpleVector3 &cameraPivotPointOffset)
sets the left camera pivot offset
virtual IndicesPtr & getIndices()
SingleCameraModelFilter class implements the frustum filter for a single camera.
void setFilteringType(FilteringType type)
sets the filtering type.
void setPivotPointOffset(const SimpleVector3 &pivotPointOffset)
sets the offset between the pivot point and the actual camera position.
virtual void setInputCloud(const ObjectPointCloudPtr &pointCloudPtr)
setting the input cloud.
void setParametersChanged(bool value)
double getFarClippingPlane()
void setVerticalFOV(double fovDegrees)
sets the vertical field of view.
void copySettings()
copies the settings of this objects to the settings of the two SingeCameraModelFilter objects...
void setHorizontalFOV(double fovDegrees)
sets the horizontal field of view.
bool haveParametersChanged()