ViSP
2.10.0
|
#include <vpMbHiddenFaces.h>
Public Member Functions | |
vpMbHiddenFaces () | |
~vpMbHiddenFaces () | |
void | addPolygon (PolygonType *p) |
bool | computeVisibility (const vpHomogeneousMatrix &cMo, const double &angleAppears, const double &angleDisappears, bool &changed, bool useOgre, bool testRoi, const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpTranslationVector &cameraPos, unsigned int index) |
void | displayOgre (const vpHomogeneousMatrix &cMo) |
std::vector< PolygonType * > & | getPolygon () |
void | initOgre (const vpCameraParameters &cam=vpCameraParameters()) |
unsigned int | getNbVisiblePolygon () const |
vpAROgre * | getOgreContext () |
bool | isAppearing (const unsigned int i) |
bool | isOgreInitialised () |
bool | isVisible (const unsigned int i) |
bool | isVisibleOgre (const vpTranslationVector &cameraPos, const unsigned int &index) |
PolygonType * | operator[] (const unsigned int i) |
const PolygonType * | operator[] (const unsigned int i) const |
void | reset () |
void | setBackgroundSizeOgre (const unsigned int &h, const unsigned int &w) |
unsigned int | setVisible (const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpHomogeneousMatrix &cMo, const double &angle, bool &changed) |
unsigned int | setVisible (const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpHomogeneousMatrix &cMo, const double &angleAppears, const double &angleDisappears, bool &changed) |
unsigned int | setVisible (const vpHomogeneousMatrix &cMo, const double &angleAppears, const double &angleDisappears, bool &changed) |
unsigned int | setVisibleOgre (const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpHomogeneousMatrix &cMo, const double &angleAppears, const double &angleDisappears, bool &changed) |
unsigned int | setVisibleOgre (const vpHomogeneousMatrix &cMo, const double &angleAppears, const double &angleDisappears, bool &changed) |
unsigned int | size () const |
Deprecated functions | |
vp_deprecated bool | getDepthTest () |
vp_deprecated void | setDepthTest (const bool &d) |
unsigned int | setVisible (const vpHomogeneousMatrix &cMo) |
Public Attributes | |
bool | depthTest |
Implementation of the polygons management for the model-based trackers.
Definition at line 68 of file vpMbHiddenFaces.h.
vpMbHiddenFaces< PolygonType >::vpMbHiddenFaces | ( | ) |
Basic constructor.
Definition at line 224 of file vpMbHiddenFaces.h.
References vpAROgre::setShowConfigDialog().
vpMbHiddenFaces< PolygonType >::~vpMbHiddenFaces | ( | ) |
Basic destructor.
Definition at line 243 of file vpMbHiddenFaces.h.
void vpMbHiddenFaces< PolygonType >::addPolygon | ( | PolygonType * | p | ) |
Add a polygon to the list of polygons.
p | : The polygon to add. |
Definition at line 278 of file vpMbHiddenFaces.h.
Referenced by vpMbTracker::addPolygon().
bool vpMbHiddenFaces< PolygonType >::computeVisibility | ( | const vpHomogeneousMatrix & | cMo, |
const double & | angleAppears, | ||
const double & | angleDisappears, | ||
bool & | changed, | ||
bool | useOgre, | ||
bool | testRoi, | ||
const vpImage< unsigned char > & | I, | ||
const vpCameraParameters & | cam, | ||
const vpTranslationVector & | cameraPos, | ||
unsigned int | index | ||
) |
Compute the visibility of a given face index.
cMo | : The pose of the camera |
angleAppears | : Angle used to test the appearance of a face |
angleDisappears | : Angle used to test the disappearance of a face |
changed | : True if a face appeared, disappeared or too many points have been lost. False otherwise |
useOgre | : True if a Ogre is used to test the visibility, False otherwise |
testRoi | : True if a face have to be entirely in the image False otherwise |
I | : Image used to test if a face is entirely projected in the image. |
cam | : Camera parameters. |
cameraPos | : Position of the camera. Used only when Ogre is used as 3rd party. |
index | : Index of the face to consider. |
Definition at line 394 of file vpMbHiddenFaces.h.
void vpMbHiddenFaces< PolygonType >::displayOgre | ( | const vpHomogeneousMatrix & | cMo | ) |
Update the display in Ogre Window.
cMo | : Pose used to display. |
Definition at line 581 of file vpMbHiddenFaces.h.
References vpAROgre::display(), and vpAROgre::isWindowHidden().
Referenced by vpMbEdgeKltTracker::display(), vpMbKltTracker::display(), and vpMbEdgeTracker::display().
|
inline |
Get the depthTest value.
Definition at line 207 of file vpMbHiddenFaces.h.
|
inline |
get the number of visible polygons.
Definition at line 122 of file vpMbHiddenFaces.h.
|
inline |
Get the Ogre3D Context.
Definition at line 130 of file vpMbHiddenFaces.h.
Referenced by vpMbTracker::setFarClippingDistance(), vpMbTracker::setNearClippingDistance(), vpMbEdgeKltTracker::vpMbEdgeKltTracker(), vpMbEdgeTracker::vpMbEdgeTracker(), and vpMbKltTracker::vpMbKltTracker().
|
inline |
Get the list of polygons.
Definition at line 111 of file vpMbHiddenFaces.h.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::extractFaces(), vpMbTracker::extractLines(), and vpMbTracker::loadCAOModel().
void vpMbHiddenFaces< PolygonType >::initOgre | ( | const vpCameraParameters & | cam = vpCameraParameters() | ) |
Initialise the ogre context for face visibility tests.
cam | : Camera parameters. |
Definition at line 549 of file vpMbHiddenFaces.h.
References vpAROgre::getSceneManager(), vpAROgre::init(), and vpAROgre::setCameraParameters().
Referenced by vpMbKltTracker::init(), and vpMbEdgeTracker::init().
|
inline |
Definition at line 133 of file vpMbHiddenFaces.h.
Referenced by vpMbEdgeTracker::computeVVS(), and vpMbEdgeKltTracker::trackFirstLoop().
|
inline |
Tell whether if Ogre Context is initialised or not.
Definition at line 142 of file vpMbHiddenFaces.h.
Referenced by vpMbKltTracker::init(), and vpMbEdgeTracker::init().
|
inline |
Check if the polygon at position i in the list is visible.
i | : TPosition in the list. |
Definition at line 152 of file vpMbHiddenFaces.h.
Referenced by vpMbEdgeTracker::initMovingEdge().
bool vpMbHiddenFaces< PolygonType >::isVisibleOgre | ( | const vpTranslationVector & | cameraPos, |
const unsigned int & | index | ||
) |
Test the visibility of a polygon through Ogre3D via RayCasting.
cameraPos | : Position of the camera in the 3D world. |
index | : Index of the polygon. |
Definition at line 641 of file vpMbHiddenFaces.h.
References vpAROgre::getCamera(), and vpAROgre::getSceneManager().
|
inline |
operator[] as modifier.
Definition at line 159 of file vpMbHiddenFaces.h.
|
inline |
operator[] as reader.
Definition at line 161 of file vpMbHiddenFaces.h.
void vpMbHiddenFaces< PolygonType >::reset | ( | ) |
Reset the Hidden faces (remove the list of PolygonType)
Definition at line 299 of file vpMbHiddenFaces.h.
References vpAROgre::setShowConfigDialog().
Referenced by vpMbKltTracker::reInitModel(), vpMbEdgeTracker::reInitModel(), vpMbKltTracker::resetTracker(), and vpMbEdgeTracker::resetTracker().
|
inline |
Set the background size (by default it is 640x480). The background size has to match with the size of the image that you are using for the traking.
h | : Height of the background |
w | : Width of the background |
Definition at line 175 of file vpMbHiddenFaces.h.
Referenced by vpMbKltTracker::init(), and vpMbEdgeTracker::init().
|
inline |
Set the depthTest value.
d | : New value. |
Definition at line 215 of file vpMbHiddenFaces.h.
unsigned int vpMbHiddenFaces< PolygonType >::setVisible | ( | const vpImage< unsigned char > & | I, |
const vpCameraParameters & | cam, | ||
const vpHomogeneousMatrix & | cMo, | ||
const double & | angle, | ||
bool & | changed | ||
) |
Compute the number of visible polygons.
I | : Image used to check if the region of interest is inside the image. |
cam | : Camera parameters. |
cMo | : The pose of the camera. |
angle | : Angle used to test the appearance and disappearance of a face. |
changed | : True if a face appeared, disappeared or too many points have been lost. False otherwise |
Definition at line 500 of file vpMbHiddenFaces.h.
Referenced by vpMbKltTracker::init(), vpMbKltTracker::postTracking(), vpMbKltTracker::setPose(), and vpMbEdgeTracker::visibleFace().
unsigned int vpMbHiddenFaces< PolygonType >::setVisible | ( | const vpImage< unsigned char > & | I, |
const vpCameraParameters & | cam, | ||
const vpHomogeneousMatrix & | cMo, | ||
const double & | angleAppears, | ||
const double & | angleDisappears, | ||
bool & | changed | ||
) |
Compute the number of visible polygons.
I | : Image used to check if the region of interest is inside the image. |
cam | : Camera parameters. |
cMo | : The pose of the camera |
changed | : True if a face appeared, disappeared or too many points have been lost. False otherwise |
angleAppears | : Angle used to test the appearance of a face |
angleDisappears | : Angle used to test the disappearance of a face |
Definition at line 519 of file vpMbHiddenFaces.h.
unsigned int vpMbHiddenFaces< PolygonType >::setVisible | ( | const vpHomogeneousMatrix & | cMo, |
const double & | angleAppears, | ||
const double & | angleDisappears, | ||
bool & | changed | ||
) |
Compute the number of visible polygons.
cMo | : The pose of the camera |
angleAppears | : Angle used to test the appearance of a face |
angleDisappears | : Angle used to test the disappearance of a face |
changed | : True if a face appeared, disappeared or too many points have been lost. False otherwise |
Definition at line 536 of file vpMbHiddenFaces.h.
unsigned int vpMbHiddenFaces< PolygonType >::setVisible | ( | const vpHomogeneousMatrix & | cMo | ) |
Compute the number of visible polygons.
cMo | : The pose of the camera |
Definition at line 732 of file vpMbHiddenFaces.h.
unsigned int vpMbHiddenFaces< PolygonType >::setVisibleOgre | ( | const vpImage< unsigned char > & | I, |
const vpCameraParameters & | cam, | ||
const vpHomogeneousMatrix & | cMo, | ||
const double & | angleAppears, | ||
const double & | angleDisappears, | ||
bool & | changed | ||
) |
Compute the number of visible polygons through Ogre3D.
I | : Image used to check if the region of interest is inside the image. |
cam | : Camera parameters. |
cMo | : The pose of the camera |
changed | : True if a face appeared, disappeared or too many points have been lost. False otherwise |
angleAppears | : Angle used to test the appearance of a face |
angleDisappears | : Angle used to test the disappearance of a face |
Definition at line 609 of file vpMbHiddenFaces.h.
Referenced by vpMbKltTracker::init(), vpMbKltTracker::postTracking(), vpMbKltTracker::setPose(), and vpMbEdgeTracker::visibleFace().
unsigned int vpMbHiddenFaces< PolygonType >::setVisibleOgre | ( | const vpHomogeneousMatrix & | cMo, |
const double & | angleAppears, | ||
const double & | angleDisappears, | ||
bool & | changed | ||
) |
Compute the number of visible polygons through Ogre3D.
cMo | : The pose of the camera |
angleAppears | : Angle used to test the appearance of a face |
angleDisappears | : Angle used to test the disappearance of a face |
changed | : True if a face appeared, disappeared or too many points have been lost. False otherwise |
Definition at line 626 of file vpMbHiddenFaces.h.
|
inline |
Get the number of polygons.
Definition at line 191 of file vpMbHiddenFaces.h.
Referenced by vpMbTracker::getNbPolygon(), vpMbTracker::getPolygon(), vpMbTracker::setClipping(), vpMbTracker::setFarClippingDistance(), vpMbTracker::setLod(), vpMbTracker::setMinLineLengthThresh(), vpMbTracker::setMinPolygonAreaThresh(), and vpMbTracker::setNearClippingDistance().
bool vpMbHiddenFaces< PolygonType >::depthTest |
Boolean specifying if a polygon has to be entirely in front of the camera or not.
Definition at line 195 of file vpMbHiddenFaces.h.
Referenced by vpMbHiddenFaces< vpMbtPolygon >::getDepthTest().