![]() |
Visual Servoing Platform
version 3.2.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 () | |
virtual | ~vpMbtFaceDepthDense () |
void | addLine (vpPoint &p1, vpPoint &p2, vpMbHiddenFaces< vpMbtPolygon > *const faces, int polygon=-1, std::string name="") |
bool | computeDesiredFeatures (const vpHomogeneousMatrix &cMo, const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &point_cloud, const unsigned int stepX, const unsigned int stepY, const vpImage< bool > *mask=NULL) |
bool | computeDesiredFeatures (const vpHomogeneousMatrix &cMo, const unsigned int width, const unsigned int height, const std::vector< vpColVector > &point_cloud, const unsigned int stepX, const unsigned int stepY, const vpImage< bool > *mask=NULL) |
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, const unsigned int thickness=1, const bool displayFullModel=false) |
void | display (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, const unsigned int thickness=1, const bool displayFullModel=false) |
void | displayFeature (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const double scale=0.05, const unsigned int thickness=1) |
void | displayFeature (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const double scale=0.05, const unsigned int thickness=1) |
unsigned int | getNbFeatures () const |
bool | isTracked () const |
bool | isVisible () const |
void | setCameraParameters (const vpCameraParameters &camera) |
void | setScanLineVisibilityTest (const bool v) |
void | setDepthDenseFilteringMaxDistance (const double maxDistance) |
void | setDepthDenseFilteringMethod (const int method) |
void | setDepthDenseFilteringMinDistance (const double minDistance) |
void | setDepthDenseFilteringOccupancyRatio (const double occupancyRatio) |
void | setTracked (const 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, const unsigned int width, const 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 |
Definition at line 52 of file vpMbtFaceDepthDense.h.
Definition at line 55 of file vpMbtFaceDepthDense.h.
vpMbtFaceDepthDense::vpMbtFaceDepthDense | ( | ) |
Definition at line 50 of file vpMbtFaceDepthDense.cpp.
|
virtual |
Definition at line 59 of file vpMbtFaceDepthDense.cpp.
References m_listOfFaceLines.
void vpMbtFaceDepthDense::addLine | ( | vpPoint & | P1, |
vpPoint & | P2, | ||
vpMbHiddenFaces< vpMbtPolygon > *const | faces, | ||
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 ploygone'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. |
polygon | : The index of the polygon to which the line belongs. |
name | : the optional name of the line |
Definition at line 79 of file vpMbtFaceDepthDense.cpp.
Referenced by vpMbDepthDenseTracker::addFace().
bool vpMbtFaceDepthDense::computeDesiredFeatures | ( | const vpHomogeneousMatrix & | cMo, |
const pcl::PointCloud< pcl::PointXYZ >::ConstPtr & | point_cloud, | ||
const unsigned int | stepX, | ||
const unsigned int | stepY, | ||
const vpImage< bool > * | mask = NULL |
||
) |
Definition at line 140 of file vpMbtFaceDepthDense.cpp.
References vpCPUFeatures::checkSSE2(), computeROI(), DEPTH_OCCUPANCY_RATIO_FILTERING, vpRect::getBottom(), vpPolygon::getBoundingBox(), vpRect::getHeight(), vpMbtPolygon::getIndex(), vpRect::getLeft(), vpMbHiddenFaces< PolygonType >::getMbScanLineRenderer(), vpRect::getRight(), vpRect::getTop(), vpRect::getWidth(), vpMeTracker::inMask(), vpPolygon::isInside(), m_depthDenseFilteringMaxDist, m_depthDenseFilteringMethod, m_depthDenseFilteringMinDist, m_depthDenseFilteringOccupancyRatio, m_hiddenFace, m_pointCloudFace, m_polygon, m_useScanLine, MAX_DISTANCE_FILTERING, MIN_DISTANCE_FILTERING, vpRect::setBottom(), vpRect::setLeft(), vpRect::setRight(), and vpRect::setTop().
Referenced by vpMbDepthDenseTracker::segmentPointCloud().
bool vpMbtFaceDepthDense::computeDesiredFeatures | ( | const vpHomogeneousMatrix & | cMo, |
const unsigned int | width, | ||
const unsigned int | height, | ||
const std::vector< vpColVector > & | point_cloud, | ||
const unsigned int | stepX, | ||
const unsigned int | stepY, | ||
const vpImage< bool > * | mask = NULL |
||
) |
Definition at line 268 of file vpMbtFaceDepthDense.cpp.
References vpCPUFeatures::checkSSE2(), computeROI(), DEPTH_OCCUPANCY_RATIO_FILTERING, vpRect::getBottom(), vpPolygon::getBoundingBox(), vpRect::getHeight(), vpMbtPolygon::getIndex(), vpRect::getLeft(), vpMbHiddenFaces< PolygonType >::getMbScanLineRenderer(), vpRect::getRight(), vpRect::getTop(), vpRect::getWidth(), vpMeTracker::inMask(), vpPolygon::isInside(), m_depthDenseFilteringMaxDist, m_depthDenseFilteringMethod, m_depthDenseFilteringMinDist, m_depthDenseFilteringOccupancyRatio, m_hiddenFace, m_pointCloudFace, m_polygon, m_useScanLine, MAX_DISTANCE_FILTERING, MIN_DISTANCE_FILTERING, vpRect::setBottom(), vpRect::setLeft(), vpRect::setRight(), and vpRect::setTop().
void vpMbtFaceDepthDense::computeInteractionMatrixAndResidu | ( | const vpHomogeneousMatrix & | cMo, |
vpMatrix & | L, | ||
vpColVector & | error | ||
) |
Definition at line 425 of file vpMbtFaceDepthDense.cpp.
References vpPlane::changeFrame(), vpCPUFeatures::checkSSE2(), vpPlane::getA(), vpPlane::getB(), vpPlane::getC(), vpPlane::getD(), getNbFeatures(), m_planeCamera, m_planeObject, m_pointCloudFace, and vpColVector::t().
Referenced by vpMbDepthDenseTracker::computeVVSInteractionMatrixAndResidu().
|
protected |
Definition at line 577 of file vpMbtFaceDepthDense.cpp.
References vpCameraParameters::computeFov(), vpMbHiddenFaces< PolygonType >::computeScanLineQuery(), vpMeterPixelConversion::convertPoint(), vpPolygon3D::DOWN_CLIPPING, vpPolygon3D::FAR_CLIPPING, vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpPolygon3D::getPolygonClipped(), vpPolygon3D::getRoiClipped(), vpPolygon3D::LEFT_CLIPPING, m_cam, m_clippingFlag, m_hiddenFace, m_polygon, m_polygonLines, m_useScanLine, vpPolygon3D::NEAR_CLIPPING, vpForwardProjection::project(), vpPolygon3D::RIGHT_CLIPPING, vpPoint::set_X(), vpPoint::set_Y(), vpPoint::set_Z(), and vpPolygon3D::UP_CLIPPING.
Referenced by computeDesiredFeatures().
void vpMbtFaceDepthDense::computeVisibility | ( | ) |
Definition at line 390 of file vpMbtFaceDepthDense.cpp.
References vpMbtPolygon::isVisible(), m_isVisible, and m_polygon.
Referenced by vpMbDepthDenseTracker::computeVisibility().
void vpMbtFaceDepthDense::computeVisibilityDisplay | ( | ) |
Definition at line 392 of file vpMbtFaceDepthDense.cpp.
References vpMbtDistanceLine::hiddenface, vpMbHiddenFaces< PolygonType >::isVisible(), vpMbtDistanceLine::Lindex_polygon, m_listOfFaceLines, and vpMbtDistanceLine::setVisible().
Referenced by display().
void vpMbtFaceDepthDense::display | ( | const vpImage< unsigned char > & | I, |
const vpHomogeneousMatrix & | cMo, | ||
const vpCameraParameters & | cam, | ||
const vpColor & | col, | ||
const unsigned int | thickness = 1 , |
||
const bool | displayFullModel = false |
||
) |
Definition at line 684 of file vpMbtFaceDepthDense.cpp.
References computeVisibilityDisplay(), vpMbtDistanceLine::display(), vpMbtPolygon::isVisible(), m_isTrackedDepthDenseFace, m_listOfFaceLines, and m_polygon.
Referenced by vpMbDepthDenseTracker::display().
void vpMbtFaceDepthDense::display | ( | const vpImage< vpRGBa > & | I, |
const vpHomogeneousMatrix & | cMo, | ||
const vpCameraParameters & | cam, | ||
const vpColor & | col, | ||
const unsigned int | thickness = 1 , |
||
const bool | displayFullModel = false |
||
) |
Definition at line 699 of file vpMbtFaceDepthDense.cpp.
References computeVisibilityDisplay(), vpMbtDistanceLine::display(), vpMbtPolygon::isVisible(), m_isTrackedDepthDenseFace, m_listOfFaceLines, and m_polygon.
void vpMbtFaceDepthDense::displayFeature | ( | const vpImage< unsigned char > & | I, |
const vpHomogeneousMatrix & | cMo, | ||
const vpCameraParameters & | cam, | ||
const double | scale = 0.05 , |
||
const unsigned int | thickness = 1 |
||
) |
Definition at line 714 of file vpMbtFaceDepthDense.cpp.
Referenced by vpMbDepthDenseTracker::display().
void vpMbtFaceDepthDense::displayFeature | ( | const vpImage< vpRGBa > & | I, |
const vpHomogeneousMatrix & | cMo, | ||
const vpCameraParameters & | cam, | ||
const double | scale = 0.05 , |
||
const unsigned int | thickness = 1 |
||
) |
Definition at line 720 of file vpMbtFaceDepthDense.cpp.
|
inline |
Definition at line 125 of file vpMbtFaceDepthDense.h.
Referenced by computeInteractionMatrixAndResidu(), and vpMbDepthDenseTracker::computeVVSInit().
|
inline |
Definition at line 127 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::segmentPointCloud().
|
inline |
Definition at line 129 of file vpMbtFaceDepthDense.h.
References vpMbtPolygon::isvisible.
Referenced by vpMbDepthDenseTracker::segmentPointCloud().
Check if two vpPoints are similar.
To be similar : .
P1 | : The first point to compare |
P2 | : The second point to compare |
Definition at line 735 of file vpMbtFaceDepthDense.cpp.
void vpMbtFaceDepthDense::setCameraParameters | ( | const vpCameraParameters & | camera | ) |
Definition at line 748 of file vpMbtFaceDepthDense.cpp.
References m_cam, and m_listOfFaceLines.
|
inline |
Definition at line 135 of file vpMbtFaceDepthDense.h.
|
inline |
Definition at line 140 of file vpMbtFaceDepthDense.h.
|
inline |
Definition at line 142 of file vpMbtFaceDepthDense.h.
|
inline |
Definition at line 147 of file vpMbtFaceDepthDense.h.
void vpMbtFaceDepthDense::setScanLineVisibilityTest | ( | const bool | v | ) |
Definition at line 758 of file vpMbtFaceDepthDense.cpp.
References m_listOfFaceLines, and m_useScanLine.
|
inline |
Definition at line 156 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::setUseDepthDenseTracking().
vpCameraParameters vpMbtFaceDepthDense::m_cam |
Camera intrinsic parameters.
Definition at line 67 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), computeROI(), and setCameraParameters().
unsigned int vpMbtFaceDepthDense::m_clippingFlag |
Flags specifying which clipping to used.
Definition at line 69 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), and computeROI().
|
protected |
Maximum distance threshold.
Definition at line 204 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures().
|
protected |
Method to use to consider or not the face.
Definition at line 202 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures().
|
protected |
Minimum distance threshold.
Definition at line 206 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures().
|
protected |
Ratio between available depth points and theoretical number of points.
Definition at line 208 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures().
double vpMbtFaceDepthDense::m_distFarClip |
Distance for near clipping.
Definition at line 71 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace().
double vpMbtFaceDepthDense::m_distNearClip |
Distance for near clipping.
Definition at line 73 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace().
vpMbHiddenFaces<vpMbtPolygon>* vpMbtFaceDepthDense::m_hiddenFace |
Pointer to the list of faces.
Definition at line 75 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), computeDesiredFeatures(), and computeROI().
|
protected |
Flag to define if the face should be tracked or not.
Definition at line 210 of file vpMbtFaceDepthDense.h.
Referenced by display().
|
protected |
Visibility flag.
Definition at line 212 of file vpMbtFaceDepthDense.h.
Referenced by computeVisibility().
|
protected |
Definition at line 213 of file vpMbtFaceDepthDense.h.
Referenced by computeVisibilityDisplay(), display(), setCameraParameters(), setScanLineVisibilityTest(), and ~vpMbtFaceDepthDense().
|
protected |
Plane equation described in the camera frame and updated with the current pose
Definition at line 216 of file vpMbtFaceDepthDense.h.
Referenced by computeInteractionMatrixAndResidu().
vpPlane vpMbtFaceDepthDense::m_planeObject |
Plane equation described in the object frame.
Definition at line 77 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), and computeInteractionMatrixAndResidu().
|
protected |
List of depth points inside the face.
Definition at line 218 of file vpMbtFaceDepthDense.h.
Referenced by computeDesiredFeatures(), and computeInteractionMatrixAndResidu().
vpMbtPolygon* vpMbtFaceDepthDense::m_polygon |
Polygon defining the face.
Definition at line 79 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), computeDesiredFeatures(), computeROI(), computeVisibility(), display(), and vpMbDepthDenseTracker::setUseDepthDenseTracking().
|
protected |
Polygon lines used for scan-line visibility.
Definition at line 220 of file vpMbtFaceDepthDense.h.
Referenced by computeROI().
bool vpMbtFaceDepthDense::m_useScanLine |
Scan line visibility.
Definition at line 81 of file vpMbtFaceDepthDense.h.
Referenced by vpMbDepthDenseTracker::addFace(), computeDesiredFeatures(), computeROI(), and setScanLineVisibilityTest().