![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpMbtDistanceCircle.h>
Public Member Functions | |
| vpMbtDistanceCircle (const vpMbtDistanceCircle &)=delete | |
| vpMbtDistanceCircle & | operator= (const vpMbtDistanceCircle &)=delete |
| vpMbtDistanceCircle () | |
| virtual | ~vpMbtDistanceCircle () |
| void | buildFrom (const vpPoint &_p1, const vpPoint &_p2, const vpPoint &_p3, double r) |
| void | computeInteractionMatrixError (const vpHomogeneousMatrix &cMo) |
| 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 | displayMovingEdges (const vpImage< unsigned char > &I) |
| void | displayMovingEdges (const vpImage< vpRGBa > &I) |
| void | getCameraParameters (vpCameraParameters &camera) |
| unsigned int | getIndex () |
| double | getMeanWeight () const |
| std::vector< std::vector< double > > | getFeaturesForDisplay () |
| std::vector< double > | getModelForDisplay (const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false) |
| std::string | getName () const |
| void | initInteractionMatrixError () |
| bool | initMovingEdge (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, bool doNotTrack, const vpImage< bool > *mask=nullptr, const int &initRange=1U) |
| bool | isTracked () const |
| bool | isVisible () const |
| void | reinitMovingEdge (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpImage< bool > *mask=nullptr) |
| void | setCameraParameters (const vpCameraParameters &camera) |
| void | setTracked (const bool &track) |
| void | setIndex (unsigned int i) |
| void | setMeanWeight (double _wmean) |
| void | setMovingEdge (vpMe *Me) |
| void | setName (const std::string &circle_name) |
| void | setName (const char *circle_name) |
| void | setVisible (bool _isvisible) |
| void | trackMovingEdge (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo) |
| void | updateMovingEdge (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo) |
Public Attributes | |
| vpMbtMeEllipse * | meEllipse |
| vpCircle * | circle |
| double | radius |
| vpPoint * | p1 |
| vpPoint * | p2 |
| vpPoint * | p3 |
| vpMatrix | L |
| vpColVector | error |
| unsigned int | nbFeature |
| bool | Reinit |
| vpMbHiddenFaces< vpMbtPolygon > * | hiddenface |
| int | index_polygon |
| bool | isvisible |
Manage a circle used in the model-based tracker.
Tutorials
If you are interested in using a MBT tracker in your applications, you may have a look at:
Definition at line 70 of file vpMbtDistanceCircle.h.
|
delete |
References vpMbtDistanceCircle().
Referenced by operator=(), and vpMbtDistanceCircle().
| vpMbtDistanceCircle::vpMbtDistanceCircle | ( | ) |
Basic constructor
Definition at line 62 of file vpMbtDistanceCircle.cpp.
References circle, error, hiddenface, index_polygon, isvisible, L, meEllipse, nbFeature, p1, p2, p3, radius, and Reinit.
|
virtual |
| void vpMbtDistanceCircle::buildFrom | ( | const vpPoint & | _p1, |
| const vpPoint & | _p2, | ||
| const vpPoint & | _p3, | ||
| double | r ) |
Build a vpMbtDistanceCircle thanks to its center, 3 points (including the center) with coordinates expressed in the object frame and defining the plane that contain the circle and its radius. With the center of the circle we have 3 points defining the plane that contains the circle.
| _p1 | : Center of the circle. |
| _p2 | : Second point on the plane containing the circle. |
| _p3 | : Third point on the plane containing the circle. |
| r | : Radius of the circle. |
Definition at line 105 of file vpMbtDistanceCircle.cpp.
References circle, vpPoint::get_oX(), vpPoint::get_oY(), vpPoint::get_oZ(), vpPlane::getA(), vpPlane::getB(), vpPlane::getC(), vpPlane::object_frame, p1, p2, p3, and radius.
Referenced by vpMbEdgeTracker::addCircle(), vpMbKltTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), and operator=().
| void vpMbtDistanceCircle::computeInteractionMatrixError | ( | const vpHomogeneousMatrix & | cMo | ) |
Compute the interaction matrix and the error vector corresponding to the point to ellipse algebraic distance.
Definition at line 458 of file vpMbtDistanceCircle.cpp.
References circle, vpPixelMeterConversion::convertPoint(), vpFeatureBuilder::create(), error, isvisible, L, meEllipse, and vpMath::sqr().
Referenced by vpMbEdgeTracker::computeVVSFirstPhase(), vpMbEdgeTracker::computeVVSFirstPhaseFactor(), vpMbEdgeTracker::computeVVSInteractionMatrixAndResidu(), operator=(), vpMbEdgeKltTracker::trackFirstLoop(), and vpMbEdgeKltTracker::trackSecondLoop().
| void vpMbtDistanceCircle::display | ( | const vpImage< unsigned char > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| const vpCameraParameters & | camera, | ||
| const vpColor & | col, | ||
| unsigned int | thickness = 1, | ||
| bool | displayFullModel = false ) |
Display the circle. The 3D circle is projected into the image as an ellipse.
| I | : The image. |
| cMo | : Pose used to project the 3D model into the image. |
| camera | : The camera parameters. |
| col | : The desired color. |
| thickness | : The thickness of the lines. |
| displayFullModel | : When true, display the circle even if non visible. If false, display the circle only if visible. |
Definition at line 300 of file vpMbtDistanceCircle.cpp.
References vpDisplay::displayEllipse(), and getModelForDisplay().
Referenced by operator=().
| void vpMbtDistanceCircle::display | ( | const vpImage< vpRGBa > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| const vpCameraParameters & | camera, | ||
| const vpColor & | col, | ||
| unsigned int | thickness = 1, | ||
| bool | displayFullModel = false ) |
Display the cylinder. The 3D cylinder is projected into the image.
| I | : The image. |
| cMo | : Pose used to project the 3D model into the image. |
| camera | : The camera parameters. |
| col | : The desired color. |
| thickness | : The thickness of the lines. |
| displayFullModel | : When true, display the circle even if non visible. If false, display the circle only if visible. |
Definition at line 324 of file vpMbtDistanceCircle.cpp.
References vpDisplay::displayEllipse(), and getModelForDisplay().
| void vpMbtDistanceCircle::displayMovingEdges | ( | const vpImage< unsigned char > & | I | ) |
Enable to display the points along the ellipse with a color corresponding to their state.
| I | : The image. |
Definition at line 422 of file vpMbtDistanceCircle.cpp.
References vpDisplay::flush(), meEllipse, and vpDEBUG_ENABLE.
Referenced by operator=(), vpMbEdgeKltTracker::postTracking(), and vpMbEdgeKltTracker::postTracking().
Definition at line 431 of file vpMbtDistanceCircle.cpp.
References vpDisplay::flush(), meEllipse, and vpDEBUG_ENABLE.
|
inline |
Get the camera parameters.
| camera | : The vpCameraParameters used to store the camera parameters. |
Definition at line 159 of file vpMbtDistanceCircle.h.
| std::vector< std::vector< double > > vpMbtDistanceCircle::getFeaturesForDisplay | ( | ) |
Return a list of features parameters for display.
Definition at line 341 of file vpMbtDistanceCircle.cpp.
References vpMeSite::get_ifloat(), vpMeSite::get_jfloat(), vpMeSite::getState(), and meEllipse.
Referenced by vpMbEdgeTracker::getFeaturesForDisplayEdge().
|
inline |
Get the index of the circle.
Definition at line 166 of file vpMbtDistanceCircle.h.
|
inline |
Get the mean weight of the circle. The mean weight is computed thanks to the weight of each moving edge. Those weights are computed by the robust estimation method used during the virtual visual servoing.
Definition at line 175 of file vpMbtDistanceCircle.h.
| std::vector< double > vpMbtDistanceCircle::getModelForDisplay | ( | const vpHomogeneousMatrix & | cMo, |
| const vpCameraParameters & | camera, | ||
| bool | displayFullModel = false ) |
Return a list of ellipse parameters to display the primitive at a given pose and camera parameters.
| cMo | : Pose used to project the 3D model into the image. |
| camera | : The camera parameters. |
| displayFullModel | : If true, the line is displayed even if it is not |
Definition at line 381 of file vpMbtDistanceCircle.cpp.
References circle, vpMeterPixelConversion::convertEllipse(), vpImagePoint::get_i(), vpImagePoint::get_j(), and isvisible.
Referenced by display(), display(), and vpMbKltTracker::getModelForDisplay().
|
inline |
Get the name of the circle.
Definition at line 187 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::removeCircle().
| void vpMbtDistanceCircle::initInteractionMatrixError | ( | ) |
Initialize the size of the interaction matrix and the error vector.
Definition at line 443 of file vpMbtDistanceCircle.cpp.
References error, isvisible, L, meEllipse, and nbFeature.
Referenced by vpMbEdgeKltTracker::initMbtTracking(), and vpMbEdgeTracker::initMbtTracking().
| bool vpMbtDistanceCircle::initMovingEdge | ( | const vpImage< unsigned char > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| bool | doNotTrack, | ||
| const vpImage< bool > * | mask = nullptr, | ||
| const int & | initRange = 1U ) |
Initialize the moving edge thanks to a given pose of the camera. The 3D model is projected into the image to create moving edges along the circle.
| I | : The image. |
| cMo | : The pose of the camera used to initialize the moving edges. |
| doNotTrack | : If true, ME are not tracked. |
| mask | : Mask image or nullptr if not wanted. Mask values that are set to true are considered in the tracking. To disable a pixel, set false. |
| initRange | The range of the ME used during the initialization. |
Definition at line 152 of file vpMbtDistanceCircle.cpp.
References circle, vpMeterPixelConversion::convertEllipse(), isvisible, and meEllipse.
Referenced by vpMbEdgeTracker::initMovingEdge(), vpMbTracker::projectionErrorInitMovingEdge(), reinitMovingEdge(), and vpMbEdgeTracker::trackMovingEdge().
|
inline |
Return if the circle is used for tracking.
Definition at line 199 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::computeProjectionError(), vpMbTracker::computeProjectionErrorImpl(), vpMbEdgeTracker::getFeaturesForDisplayEdge(), vpMbEdgeTracker::getNbPoints(), vpMbEdgeKltTracker::initMbtTracking(), vpMbEdgeTracker::initMbtTracking(), vpMbEdgeTracker::initMovingEdge(), vpMbEdgeKltTracker::postTracking(), vpMbEdgeKltTracker::postTracking(), vpMbTracker::projectionErrorInitMovingEdge(), vpMbEdgeTracker::testTracking(), and vpMbEdgeTracker::trackMovingEdge().
|
inline |
Check if the circle is visible in the image or not.
Definition at line 206 of file vpMbtDistanceCircle.h.
References isvisible.
Referenced by vpMbEdgeTracker::computeProjectionError(), vpMbTracker::computeProjectionErrorImpl(), vpMbEdgeTracker::getFeaturesForDisplayEdge(), vpMbEdgeTracker::getNbPoints(), vpMbEdgeKltTracker::postTracking(), vpMbEdgeKltTracker::postTracking(), vpMbEdgeTracker::reinitMovingEdge(), vpMbEdgeTracker::testTracking(), vpMbEdgeTracker::trackMovingEdge(), and vpMbEdgeTracker::updateMovingEdge().
|
delete |
References buildFrom(), computeInteractionMatrixError(), display(), displayMovingEdges(), and vpMbtDistanceCircle().
| void vpMbtDistanceCircle::reinitMovingEdge | ( | const vpImage< unsigned char > & | I, |
| const vpHomogeneousMatrix & | cMo, | ||
| const vpImage< bool > * | mask = nullptr ) |
Reinitialize the circle if it is required.
A circle is reinitialized if the ellipse do not match enough with the projected 3D circle.
| I | : the image. |
| cMo | : The pose of the camera. |
| mask | : Mask image or nullptr if not wanted. Mask values that are set to true are considered in the tracking. To disable a pixel, set false. |
Definition at line 275 of file vpMbtDistanceCircle.cpp.
References initMovingEdge(), meEllipse, and Reinit.
Referenced by vpMbEdgeTracker::reInitLevel(), and vpMbEdgeTracker::reinitMovingEdge().
|
inline |
Set the camera parameters.
| camera | : The camera parameters. |
Definition at line 215 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbKltTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), and vpMbTracker::computeProjectionErrorImpl().
|
inline |
Set the index of the circle.
| i | : The index number |
Definition at line 229 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), and vpMbTracker::addProjectionErrorCircle().
|
inline |
Set the mean weight of the circle.
| _wmean | : The mean weight of the circle. |
Definition at line 236 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeKltTracker::postTrackingMbt(), and vpMbEdgeTracker::updateMovingEdgeWeights().
| void vpMbtDistanceCircle::setMovingEdge | ( | vpMe * | _me | ) |
Set the moving edge parameters.
| _me | : an instance of vpMe containing all the desired parameters |
Definition at line 131 of file vpMbtDistanceCircle.cpp.
References meEllipse.
Referenced by vpMbEdgeTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), vpMbEdgeTracker::setMovingEdge(), and vpMbTracker::setProjectionErrorMovingEdge().
|
inline |
Set the name of the circle.
| circle_name | : The name of the circle. |
Definition at line 252 of file vpMbtDistanceCircle.h.
|
inline |
Set the name of the circle.
| circle_name | : The name of the circle. |
Definition at line 245 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbKltTracker::addCircle(), and vpMbTracker::addProjectionErrorCircle().
|
inline |
Set if the circle has to considered during tracking phase.
| track | : True if the circle has to be tracked, False otherwise. |
Definition at line 222 of file vpMbtDistanceCircle.h.
|
inline |
Set a boolean parameter to indicates if the circle is visible in the image or not.
| _isvisible | : Set to true if the circle is visible |
Definition at line 260 of file vpMbtDistanceCircle.h.
References isvisible.
Referenced by vpMbEdgeTracker::initMovingEdge(), and vpMbTracker::projectionErrorInitMovingEdge().
| void vpMbtDistanceCircle::trackMovingEdge | ( | const vpImage< unsigned char > & | I, |
| const vpHomogeneousMatrix & | cMo ) |
Track the moving edges in the image.
| I | : the image. |
| cMo | : The pose of the camera (unused). |
Definition at line 206 of file vpMbtDistanceCircle.cpp.
References isvisible, meEllipse, nbFeature, and Reinit.
Referenced by vpMbEdgeTracker::trackMovingEdge().
| void vpMbtDistanceCircle::updateMovingEdge | ( | const vpImage< unsigned char > & | I, |
| const vpHomogeneousMatrix & | cMo ) |
Update the moving edges internal parameters.
| I | : the image. |
| cMo | : The pose of the camera. |
Definition at line 235 of file vpMbtDistanceCircle.cpp.
References circle, vpMeterPixelConversion::convertEllipse(), isvisible, meEllipse, nbFeature, and Reinit.
Referenced by vpMbEdgeTracker::updateMovingEdge().
| vpCircle* vpMbtDistanceCircle::circle |
The circle to track.
Definition at line 89 of file vpMbtDistanceCircle.h.
Referenced by buildFrom(), computeInteractionMatrixError(), getModelForDisplay(), initMovingEdge(), updateMovingEdge(), vpMbtDistanceCircle(), and ~vpMbtDistanceCircle().
| vpColVector vpMbtDistanceCircle::error |
The error vector.
Definition at line 104 of file vpMbtDistanceCircle.h.
Referenced by computeInteractionMatrixError(), vpMbEdgeTracker::computeVVSFirstPhase(), vpMbEdgeTracker::computeVVSInteractionMatrixAndResidu(), initInteractionMatrixError(), vpMbEdgeKltTracker::trackSecondLoop(), and vpMbtDistanceCircle().
| vpMbHiddenFaces<vpMbtPolygon>* vpMbtDistanceCircle::hiddenface |
Pointer to the list of faces.
Definition at line 110 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), vpMbEdgeTracker::initMovingEdge(), vpMbTracker::projectionErrorInitMovingEdge(), and vpMbtDistanceCircle().
| int vpMbtDistanceCircle::index_polygon |
Index of the faces which contain the line.
Definition at line 112 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), vpMbEdgeTracker::initMovingEdge(), vpMbTracker::projectionErrorInitMovingEdge(), and vpMbtDistanceCircle().
| bool vpMbtDistanceCircle::isvisible |
Indicates if the circle is visible or not.
Definition at line 114 of file vpMbtDistanceCircle.h.
Referenced by computeInteractionMatrixError(), getModelForDisplay(), initInteractionMatrixError(), initMovingEdge(), isVisible(), setVisible(), trackMovingEdge(), updateMovingEdge(), and vpMbtDistanceCircle().
| vpMatrix vpMbtDistanceCircle::L |
The interaction matrix.
Definition at line 102 of file vpMbtDistanceCircle.h.
Referenced by computeInteractionMatrixError(), vpMbEdgeTracker::computeVVSFirstPhase(), vpMbEdgeTracker::computeVVSInteractionMatrixAndResidu(), initInteractionMatrixError(), vpMbEdgeKltTracker::trackSecondLoop(), and vpMbtDistanceCircle().
| vpMbtMeEllipse* vpMbtDistanceCircle::meEllipse |
The moving edge containers.
Definition at line 86 of file vpMbtDistanceCircle.h.
Referenced by computeInteractionMatrixError(), vpMbEdgeTracker::computeProjectionError(), vpMbTracker::computeProjectionErrorImpl(), vpMbEdgeTracker::computeVVSFirstPhase(), vpMbEdgeTracker::computeVVSFirstPhaseFactor(), displayMovingEdges(), displayMovingEdges(), getFeaturesForDisplay(), vpMbEdgeTracker::getNbPoints(), initInteractionMatrixError(), vpMbEdgeTracker::initMovingEdge(), initMovingEdge(), vpMbEdgeKltTracker::postTrackingMbt(), vpMbTracker::projectionErrorInitMovingEdge(), reinitMovingEdge(), setMovingEdge(), vpMbEdgeTracker::testTracking(), vpMbEdgeKltTracker::trackFirstLoop(), vpMbEdgeTracker::trackMovingEdge(), trackMovingEdge(), updateMovingEdge(), vpMbEdgeTracker::updateMovingEdgeWeights(), vpMbtDistanceCircle(), and ~vpMbtDistanceCircle().
| unsigned int vpMbtDistanceCircle::nbFeature |
The number of moving edges.
Definition at line 106 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::computeVVSFirstPhase(), vpMbEdgeTracker::computeVVSFirstPhaseFactor(), vpMbEdgeTracker::computeVVSInteractionMatrixAndResidu(), initInteractionMatrixError(), vpMbEdgeKltTracker::initMbtTracking(), vpMbEdgeTracker::initMbtTracking(), vpMbEdgeTracker::initMovingEdge(), vpMbEdgeKltTracker::postTrackingMbt(), vpMbTracker::projectionErrorInitMovingEdge(), vpMbEdgeKltTracker::trackFirstLoop(), trackMovingEdge(), vpMbEdgeKltTracker::trackSecondLoop(), vpMbEdgeTracker::updateMovingEdge(), updateMovingEdge(), vpMbEdgeTracker::updateMovingEdgeWeights(), and vpMbtDistanceCircle().
| vpPoint* vpMbtDistanceCircle::p1 |
The center of the circle.
Definition at line 95 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), buildFrom(), vpMbtDistanceCircle(), and ~vpMbtDistanceCircle().
| vpPoint* vpMbtDistanceCircle::p2 |
A point on the plane containing the circle.
Definition at line 97 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), buildFrom(), vpMbtDistanceCircle(), and ~vpMbtDistanceCircle().
| vpPoint* vpMbtDistanceCircle::p3 |
An other point on the plane containing the circle.
Definition at line 99 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), buildFrom(), vpMbtDistanceCircle(), and ~vpMbtDistanceCircle().
| double vpMbtDistanceCircle::radius |
The radius of the circle.
Definition at line 92 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeTracker::addCircle(), vpMbTracker::addProjectionErrorCircle(), buildFrom(), and vpMbtDistanceCircle().
| bool vpMbtDistanceCircle::Reinit |
Indicates if the circle has to be reinitialized.
Definition at line 108 of file vpMbtDistanceCircle.h.
Referenced by vpMbEdgeKltTracker::postTrackingMbt(), vpMbEdgeTracker::reinitMovingEdge(), reinitMovingEdge(), trackMovingEdge(), vpMbEdgeTracker::updateMovingEdge(), updateMovingEdge(), vpMbEdgeTracker::updateMovingEdgeWeights(), and vpMbtDistanceCircle().