![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpMbtFaceDepthDense.h>
Public Types | |
| enum | vpDepthDenseFilteringType { NO_FILTERING = 0 , DEPTH_OCCUPANCY_RATIO_FILTERING = 1 << 1 , MIN_DISTANCE_FILTERING = 1 << 2 , MAX_DISTANCE_FILTERING = 1 << 3 } |
Public Member Functions | |
| vpMbtFaceDepthDense () | |
| vpMbtFaceDepthDense (const vpMbtFaceDepthDense &mbt_face) | |
| virtual | ~vpMbtFaceDepthDense () |
| vpMbtFaceDepthDense & | operator= (const vpMbtFaceDepthDense &mbt_face) |
| void | addLine (vpPoint &p1, vpPoint &p2, vpMbHiddenFaces< vpMbtPolygon > *const faces, vpUniRand &rand_gen, int polygon=-1, std::string name="") |
| bool | computeDesiredFeatures (const vpHomogeneousMatrix &cMo, const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &point_cloud, unsigned int stepX, unsigned int stepY, const vpImage< bool > *mask=nullptr) |
| bool | computeDesiredFeatures (const vpHomogeneousMatrix &cMo, unsigned int width, unsigned int height, const std::vector< vpColVector > &point_cloud, unsigned int stepX, unsigned int stepY, const vpImage< bool > *mask=nullptr) |
| bool | computeDesiredFeatures (const vpHomogeneousMatrix &cMo, unsigned int width, unsigned int height, const vpMatrix &point_cloud, unsigned int stepX, unsigned int stepY, const vpImage< bool > *mask=nullptr) |
| void | computeInteractionMatrixAndResidu (const vpHomogeneousMatrix &cMo, vpMatrix &L, vpColVector &error) |
| void | computeVisibility () |
| void | computeVisibilityDisplay () |
| void | display (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false) |
| void | display (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false) |
| void | displayFeature (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double scale=0.05, unsigned int thickness=1) |
| void | displayFeature (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double scale=0.05, unsigned int thickness=1) |
| std::vector< std::vector< double > > | getModelForDisplay (unsigned int width, unsigned int height, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false) |
| unsigned int | getNbFeatures () const |
| bool | isTracked () const |
| bool | isVisible () const |
| void | setCameraParameters (const vpCameraParameters &camera) |
| void | setScanLineVisibilityTest (bool v) |
| void | setDepthDenseFilteringMaxDistance (double maxDistance) |
| void | setDepthDenseFilteringMethod (int method) |
| void | setDepthDenseFilteringMinDistance (double minDistance) |
| void | setDepthDenseFilteringOccupancyRatio (double occupancyRatio) |
| void | setTracked (bool tracked) |
Public Attributes | |
| vpCameraParameters | m_cam |
| unsigned int | m_clippingFlag |
| double | m_distFarClip |
| double | m_distNearClip |
| vpMbHiddenFaces< vpMbtPolygon > * | m_hiddenFace |
| vpPlane | m_planeObject |
| vpMbtPolygon * | m_polygon |
| bool | m_useScanLine |
Protected Member Functions | |
| void | computeROI (const vpHomogeneousMatrix &cMo, unsigned int width, unsigned int height, std::vector< vpImagePoint > &roiPts, double &distanceToFace) |
| bool | samePoint (const vpPoint &P1, const vpPoint &P2) const |
Protected Attributes | |
| int | m_depthDenseFilteringMethod |
| double | m_depthDenseFilteringMaxDist |
| double | m_depthDenseFilteringMinDist |
| double | m_depthDenseFilteringOccupancyRatio |
| bool | m_isTrackedDepthDenseFace |
| bool | m_isVisible |
| std::vector< vpMbtDistanceLine * > | m_listOfFaceLines |
| vpPlane | m_planeCamera |
| std::vector< double > | m_pointCloudFace |
| std::vector< PolygonLine > | m_polygonLines |
Manage depth dense features for a particular face.
Tutorials
If you are interested in using a MBT tracker in your applications, you may have a look at:
Definition at line 68 of file vpMbtFaceDepthDense.h.
Definition at line 71 of file vpMbtFaceDepthDense.h.
| BEGIN_VISP_NAMESPACE vpMbtFaceDepthDense::vpMbtFaceDepthDense | ( | ) |
Default constructor.
Definition at line 179 of file vpMbtFaceDepthDense.cpp.
References DEPTH_OCCUPANCY_RATIO_FILTERING, m_cam, m_clippingFlag, m_depthDenseFilteringMaxDist, m_depthDenseFilteringMethod, m_depthDenseFilteringMinDist, m_depthDenseFilteringOccupancyRatio, m_distFarClip, m_distNearClip, m_hiddenFace, m_isTrackedDepthDenseFace, m_isVisible, m_listOfFaceLines, m_planeCamera, m_planeObject, m_pointCloudFace, m_polygon, m_polygonLines, and m_useScanLine.
Referenced by operator=(), and vpMbtFaceDepthDense().
| vpMbtFaceDepthDense::vpMbtFaceDepthDense | ( | const vpMbtFaceDepthDense & | mbt_face | ) |
Copy constructor.
| mbt_face | : MBT face to copy. |
Definition at line 191 of file vpMbtFaceDepthDense.cpp.
References vpMbtFaceDepthDense().
|
virtual |
| void vpMbtFaceDepthDense::addLine | ( | vpPoint & | P1, |
| vpPoint & | P2, | ||
| vpMbHiddenFaces< vpMbtPolygon > *const | faces, | ||
| vpUniRand & | rand_gen, | ||
| int | polygon = -1, | ||
| std::string | name = "" ) |
Add a line belonging to the
the polygon to the list of lines. It is defined by its two extremities.
If the line already exists, the polygon's index is added to the list of polygon to which it belongs.
| P1 | : The first extremity of the line. |
| P2 | : The second extremity of the line. |
| faces | : Pointer to vpMbHiddenFaces. |
| rand_gen | : Random number generator used in vpMbtDistanceLine::buildFrom(). |
| polygon | : The index of the polygon to which the line belongs. |
| name | : the optional name of the line |
Definition at line 247 of file vpMbtFaceDepthDense.cpp.
References vpPolygon3D::addPoint(), vpMbtDistanceLine::addPolygon(), vpMbtDistanceLine::buildFrom(), vpPolygon3D::FAR_CLIPPING, vpMbtDistanceLine::getPolygon(), vpMbtDistanceLine::hiddenface, m_cam, m_clippingFlag, m_distFarClip, m_distNearClip, m_listOfFaceLines, m_polygonLines, m_useScanLine, vpPolygon3D::NEAR_CLIPPING, vpPolygon3D::NO_CLIPPING, vpPolygon3D::p, vpMbtDistanceLine::p1, vpMbtDistanceLine::p2, samePoint(), vpMbtDistanceLine::setCameraParameters(), vpPolygon3D::setClipping(), vpPolygon3D::setFarClippingDistance(), vpMbtDistanceLine::setIndex(), vpMbtDistanceLine::setName(), vpPolygon3D::setNbPoint(), vpPolygon3D::setNearClippingDistance(), and vpMbtDistanceLine::useScanLine.
Referenced by vpMbDepthDenseTracker::addFace().
| bool vpMbtFaceDepthDense::computeDesiredFeatures | ( | const vpHomogeneousMatrix & | cMo, |
| const pcl::PointCloud< pcl::PointXYZ >::ConstPtr & | point_cloud, | ||
| unsigned int | stepX, | ||
| unsigned int | stepY, | ||
| const vpImage< bool > * | mask = nullptr ) |
Definition at line 308 of file vpMbtFaceDepthDense.cpp.
References computeROI(), DEPTH_OCCUPANCY_RATIO_FILTERING, vpPolygon::getBoundingBox(), vpMeTracker::inRoiMask(), vpPolygon::isInside(), m_depthDenseFilteringMaxDist, m_depthDenseFilteringMethod, m_depthDenseFilteringMinDist, m_depthDenseFilteringOccupancyRatio, m_hiddenFace, m_pointCloudFace, m_polygon, m_useScanLine, MAX_DISTANCE_FILTERING, and MIN_DISTANCE_FILTERING.
Referenced by vpMbDepthDenseTracker::segmentPointCloud(), vpMbDepthDenseTracker::segmentPointCloud(), and vpMbDepthDenseTracker::segmentPointCloud().
| bool vpMbtFaceDepthDense::computeDesiredFeatures | ( | const vpHomogeneousMatrix & | cMo, |
| unsigned int | width, | ||
| unsigned int | height, | ||
| const std::vector< vpColVector > & | point_cloud, | ||
| unsigned int | stepX, | ||
| unsigned int | stepY, | ||
| const vpImage< bool > * | mask = nullptr ) |
Definition at line 399 of file vpMbtFaceDepthDense.cpp.
References computeROI(), DEPTH_OCCUPANCY_RATIO_FILTERING, vpPolygon::getBoundingBox(), vpMeTracker::inRoiMask(), vpPolygon::isInside(), m_depthDenseFilteringMaxDist, m_depthDenseFilteringMethod, m_depthDenseFilteringMinDist, m_depthDenseFilteringOccupancyRatio, m_hiddenFace, m_pointCloudFace, m_polygon, m_useScanLine, MAX_DISTANCE_FILTERING, and MIN_DISTANCE_FILTERING.
| bool vpMbtFaceDepthDense::computeDesiredFeatures | ( | const vpHomogeneousMatrix & | cMo, |
| unsigned int | width, | ||
| unsigned int | height, | ||
| const vpMatrix & | point_cloud, | ||
| unsigned int | stepX, | ||
| unsigned int | stepY, | ||
| const vpImage< bool > * | mask = nullptr ) |
Definition at line 484 of file vpMbtFaceDepthDense.cpp.
References computeROI(), DEPTH_OCCUPANCY_RATIO_FILTERING, vpPolygon::getBoundingBox(), vpMeTracker::inRoiMask(), vpPolygon::isInside(), m_depthDenseFilteringMaxDist, m_depthDenseFilteringMethod, m_depthDenseFilteringMinDist, m_depthDenseFilteringOccupancyRatio, m_hiddenFace, m_pointCloudFace, m_polygon, m_useScanLine, MAX_DISTANCE_FILTERING, and MIN_DISTANCE_FILTERING.
| void vpMbtFaceDepthDense::computeInteractionMatrixAndResidu | ( | const vpHomogeneousMatrix & | cMo, |
| vpMatrix & | L, | ||
| vpColVector & | error ) |
Definition at line 606 of file vpMbtFaceDepthDense.cpp.
References vpCPUFeatures::checkNeon(), vpCPUFeatures::checkSSE2(), getNbFeatures(), m_planeCamera, m_planeObject, m_pointCloudFace, and vpColVector::t().
Referenced by vpMbDepthDenseTracker::computeVVSInteractionMatrixAndResidu().
|
protected |
Definition at line 839 of file vpMbtFaceDepthDense.cpp.
References vpMeterPixelConversion::convertPoint(), vpPolygon3D::DOWN_CLIPPING, vpPolygon3D::FAR_CLIPPING, vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpPolygon3D::LEFT_CLIPPING, m_cam, m_clippingFlag, m_hiddenFace, m_polygon, m_polygonLines, m_useScanLine, vpPolygon3D::NEAR_CLIPPING, vpPolygon3D::RIGHT_CLIPPING, vpPoint::set_X(), vpPoint::set_Y(), vpPoint::set_Z(), and vpPolygon3D::UP_CLIPPING.
Referenced by computeDesiredFeatures(), computeDesiredFeatures(), and computeDesiredFeatures().
| void vpMbtFaceDepthDense::computeVisibility | ( | ) |
Definition at line 569 of file vpMbtFaceDepthDense.cpp.
References m_isVisible, and m_polygon.
Referenced by vpMbDepthDenseTracker::computeVisibility().
| void vpMbtFaceDepthDense::computeVisibilityDisplay | ( | ) |
Definition at line 571 of file vpMbtFaceDepthDense.cpp.
References vpMbtDistanceLine::hiddenface, vpMbHiddenFaces< PolygonType >::isVisible(), vpMbtDistanceLine::Lindex_polygon, m_listOfFaceLines, and vpMbtDistanceLine::setVisible().
Referenced by getModelForDisplay().
| void vpMbtFaceDepthDense::display | ( | const vpImage< unsigned char > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| const vpCameraParameters & | cam, | ||
| const vpColor & | col, | ||
| unsigned int | thickness = 1, | ||
| bool | displayFullModel = false ) |
Definition at line 949 of file vpMbtFaceDepthDense.cpp.
References vpDisplay::displayLine(), and getModelForDisplay().
| void vpMbtFaceDepthDense::display | ( | const vpImage< vpRGBa > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| const vpCameraParameters & | cam, | ||
| const vpColor & | col, | ||
| unsigned int | thickness = 1, | ||
| bool | displayFullModel = false ) |
Definition at line 963 of file vpMbtFaceDepthDense.cpp.
References vpDisplay::displayLine(), and getModelForDisplay().
| void vpMbtFaceDepthDense::displayFeature | ( | const vpImage< unsigned char > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| const vpCameraParameters & | cam, | ||
| double | scale = 0.05, | ||
| unsigned int | thickness = 1 ) |
Definition at line 977 of file vpMbtFaceDepthDense.cpp.
| void vpMbtFaceDepthDense::displayFeature | ( | const vpImage< vpRGBa > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| const vpCameraParameters & | cam, | ||
| double | scale = 0.05, | ||
| unsigned int | thickness = 1 ) |
Definition at line 982 of file vpMbtFaceDepthDense.cpp.
| std::vector< std::vector< double > > vpMbtFaceDepthDense::getModelForDisplay | ( | unsigned int | width, |
| unsigned int | height, | ||
| const vpHomogeneousMatrix & | cMo, | ||
| const vpCameraParameters & | cam, | ||
| bool | displayFullModel = false ) |
Return a list of line parameters to display the primitive at a given pose and camera parameters.
| width | : Image width. |
| height | : Image height. |
| cMo | : Pose used to project the 3D model into the image. |
| cam | : The camera parameters. |
| displayFullModel | : If true, the line is displayed even if it is not |
Definition at line 998 of file vpMbtFaceDepthDense.cpp.
References computeVisibilityDisplay(), vpMbtDistanceLine::getModelForDisplay(), m_isTrackedDepthDenseFace, m_listOfFaceLines, and m_polygon.
Referenced by display(), display(), and vpMbDepthDenseTracker::getModelForDisplay().
|
inline |
Definition at line 155 of file vpMbtFaceDepthDense.h.
References m_pointCloudFace.
Referenced by computeInteractionMatrixAndResidu(), and vpMbDepthDenseTracker::computeVVSInit().
|
inline |
Definition at line 157 of file vpMbtFaceDepthDense.h.
References m_isTrackedDepthDenseFace.
Referenced by vpMbDepthDenseTracker::segmentPointCloud(), vpMbDepthDenseTracker::segmentPointCloud(), and vpMbDepthDenseTracker::segmentPointCloud().
|
inline |
Definition at line 159 of file vpMbtFaceDepthDense.h.
References m_polygon.
Referenced by vpMbDepthDenseTracker::segmentPointCloud(), vpMbDepthDenseTracker::segmentPointCloud(), and vpMbDepthDenseTracker::segmentPointCloud().
| vpMbtFaceDepthDense & vpMbtFaceDepthDense::operator= | ( | const vpMbtFaceDepthDense & | mbt_face | ) |
Copy operator.
| mbt_face | : MBT face to copy. |
Definition at line 200 of file vpMbtFaceDepthDense.cpp.
References m_cam, m_clippingFlag, m_depthDenseFilteringMaxDist, m_depthDenseFilteringMethod, m_depthDenseFilteringMinDist, m_depthDenseFilteringOccupancyRatio, m_distFarClip, m_distNearClip, m_hiddenFace, m_isTrackedDepthDenseFace, m_isVisible, m_listOfFaceLines, m_planeCamera, m_planeObject, m_pointCloudFace, m_polygon, m_polygonLines, m_useScanLine, and vpMbtFaceDepthDense().
Check if two vpPoints are similar.
To be similar :
.
| P1 | : The first point to compare |
| P2 | : The second point to compare |
Definition at line 1029 of file vpMbtFaceDepthDense.cpp.
References vpPoint::get_oX(), vpPoint::get_oY(), and vpPoint::get_oZ().
Referenced by addLine().
| void vpMbtFaceDepthDense::setCameraParameters | ( | const vpCameraParameters & | camera | ) |
Definition at line 1042 of file vpMbtFaceDepthDense.cpp.
References m_cam, and m_listOfFaceLines.
|
inline |
Definition at line 165 of file vpMbtFaceDepthDense.h.
References m_depthDenseFilteringMaxDist.
|
inline |
Definition at line 167 of file vpMbtFaceDepthDense.h.
References m_depthDenseFilteringMethod.
|
inline |
Definition at line 169 of file vpMbtFaceDepthDense.h.
References m_depthDenseFilteringMinDist.
|
inline |
Definition at line 171 of file vpMbtFaceDepthDense.h.
References m_depthDenseFilteringOccupancyRatio.
| void vpMbtFaceDepthDense::setScanLineVisibilityTest | ( | bool | v | ) |
Definition at line 1052 of file vpMbtFaceDepthDense.cpp.
References m_listOfFaceLines, and m_useScanLine.
|
inline |
Definition at line 181 of file vpMbtFaceDepthDense.h.
References m_isTrackedDepthDenseFace.
Referenced by vpMbDepthDenseTracker::setUseDepthDenseTracking().
| vpCameraParameters vpMbtFaceDepthDense::m_cam |
Camera intrinsic parameters.
Definition at line 84 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), addLine(), computeROI(), operator=(), setCameraParameters(), and vpMbtFaceDepthDense().
| unsigned int vpMbtFaceDepthDense::m_clippingFlag |
Flags specifying which clipping to used.
Definition at line 86 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), addLine(), computeROI(), operator=(), and vpMbtFaceDepthDense().
|
protected |
Maximum distance threshold.
Definition at line 229 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), operator=(), setDepthDenseFilteringMaxDistance(), and vpMbtFaceDepthDense().
|
protected |
Method to use to consider or not the face.
Definition at line 227 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), operator=(), setDepthDenseFilteringMethod(), and vpMbtFaceDepthDense().
|
protected |
Minimum distance threshold.
Definition at line 231 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), operator=(), setDepthDenseFilteringMinDistance(), and vpMbtFaceDepthDense().
|
protected |
Ratio between available depth points and theoretical number of points.
Definition at line 233 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), operator=(), setDepthDenseFilteringOccupancyRatio(), and vpMbtFaceDepthDense().
| double vpMbtFaceDepthDense::m_distFarClip |
Distance for near clipping.
Definition at line 88 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), addLine(), operator=(), and vpMbtFaceDepthDense().
| double vpMbtFaceDepthDense::m_distNearClip |
Distance for near clipping.
Definition at line 90 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), addLine(), operator=(), and vpMbtFaceDepthDense().
| vpMbHiddenFaces<vpMbtPolygon>* vpMbtFaceDepthDense::m_hiddenFace |
Pointer to the list of faces.
Definition at line 92 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), computeROI(), operator=(), and vpMbtFaceDepthDense().
|
protected |
Flag to define if the face should be tracked or not.
Definition at line 235 of file vpMbtFaceDepthDense.h.
Referenced by getModelForDisplay(), isTracked(), operator=(), setTracked(), and vpMbtFaceDepthDense().
|
protected |
Visibility flag.
Definition at line 237 of file vpMbtFaceDepthDense.h.
Referenced by computeVisibility(), operator=(), and vpMbtFaceDepthDense().
|
protected |
Definition at line 238 of file vpMbtFaceDepthDense.h.
Referenced by addLine(), computeVisibilityDisplay(), getModelForDisplay(), operator=(), setCameraParameters(), setScanLineVisibilityTest(), vpMbtFaceDepthDense(), and ~vpMbtFaceDepthDense().
|
protected |
Plane equation described in the camera frame and updated with the current pose
Definition at line 241 of file vpMbtFaceDepthDense.h.
Referenced by computeInteractionMatrixAndResidu(), operator=(), and vpMbtFaceDepthDense().
| vpPlane vpMbtFaceDepthDense::m_planeObject |
Plane equation described in the object frame.
Definition at line 94 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), computeInteractionMatrixAndResidu(), operator=(), and vpMbtFaceDepthDense().
|
protected |
List of depth points inside the face.
Definition at line 243 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), computeInteractionMatrixAndResidu(), getNbFeatures(), operator=(), and vpMbtFaceDepthDense().
| vpMbtPolygon* vpMbtFaceDepthDense::m_polygon |
Polygon defining the face.
Definition at line 96 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), computeROI(), computeVisibility(), getModelForDisplay(), isVisible(), operator=(), vpMbDepthDenseTracker::setUseDepthDenseTracking(), and vpMbtFaceDepthDense().
|
protected |
Polygon lines used for scan-line visibility.
Definition at line 245 of file vpMbtFaceDepthDense.h.
Referenced by addLine(), computeROI(), operator=(), and vpMbtFaceDepthDense().
| bool vpMbtFaceDepthDense::m_useScanLine |
Scan line visibility.
Definition at line 98 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), addLine(), computeDesiredFeatures(), computeDesiredFeatures(), computeDesiredFeatures(), computeROI(), operator=(), setScanLineVisibilityTest(), and vpMbtFaceDepthDense().