Visual Servoing Platform
version 3.0.0
|
#include <visp3/core/vpMeterPixelConversion.h>
Static Public Member Functions | |
static void | convertEllipse (const vpCameraParameters &cam, const vpCircle &circle, vpImagePoint ¢er, double &mu20_p, double &mu11_p, double &mu02_p) |
static void | convertLine (const vpCameraParameters &cam, const double &rho_m, const double &theta_m, double &rho_p, double &theta_p) |
static void | convertPoint (const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v) |
static void | convertPoint (const vpCameraParameters &cam, const double &x, const double &y, vpImagePoint &iP) |
Conversion from normalized coordinates in meter to pixel coordinates .
This class relates to vpCameraParameters.
Definition at line 67 of file vpMeterPixelConversion.h.
|
static |
Converts an ellipse with parameters expressed in meter in the image plane in parameters expressed in the image in pixels.
The ellipse is here represented by its parameters .
cam | [in]: Intrinsic camera parameters. |
circle | [in]: 3D circle with parameters circle.p[] expressed in meters in the image plane. |
center | [out]: Center of the corresponding ellipse in the image with coordinates expressed in pixels. |
mu20_p,mu11_p,mu02_p | [out]: Centered moments expressed in pixels. |
The following code shows how to use this function:
Definition at line 95 of file vpMeterPixelConversion.cpp.
References convertPoint(), vpCameraParameters::get_px(), vpCameraParameters::get_py(), vpTracker::p, and vpMath::sqr().
Referenced by vpMbtDistanceCircle::display(), vpMbtDistanceCircle::initMovingEdge(), and vpMbtDistanceCircle::updateMovingEdge().
|
static |
Line coordinates conversion (rho,theta).
Definition at line 52 of file vpMeterPixelConversion.cpp.
References vpException::divideByZeroError, vpMath::sqr(), and vpERROR_TRACE.
Referenced by vpMbtDistanceKltCylinder::display(), vpMbtDistanceCylinder::display(), vpFeatureDisplay::displayLine(), vpMbtDistanceLine::initMovingEdge(), vpMbtDistanceCylinder::initMovingEdge(), vpMbtDistanceLine::updateMovingEdge(), and vpMbtDistanceCylinder::updateMovingEdge().
|
inlinestatic |
Point coordinates conversion from normalized coordinates in meter to pixel coordinates .
The used formula depends on the projection model of the camera. To know the currently used projection model use vpCameraParameter::get_projModel()
cam | : camera parameters. |
x,y | : input coordinates in meter. |
u,v | : output coordinates in pixels. |
and in the case of perspective projection without distortion.
and with in the case of perspective projection with distortion.
Definition at line 100 of file vpMeterPixelConversion.h.
References vpCameraParameters::perspectiveProjWithDistortion, and vpCameraParameters::perspectiveProjWithoutDistortion.
Referenced by vpPolygon::buildFrom(), convertEllipse(), vpFeatureBuilder::create(), vpFeatureSegment::display(), vpProjectionDisplay::display(), vpMbtDistanceLine::display(), vpMbtDistanceKltPoints::display(), vpProjectionDisplay::displayCamera(), vpDisplay::displayCamera(), vpFeatureDisplay::displayEllipse(), vpDisplay::displayFrame(), vpPose::displayModel(), vpFeatureDisplay::displayPoint(), vpPolygon3D::getNbCornerInsideImage(), vpMbTracker::getPolygonFaces(), vpPolygon3D::getRoi(), vpPolygon3D::getRoiClipped(), vpMbtDistanceLine::initMovingEdge(), vpKeyPoint::matchPointAndDetect(), vpWireFrameSimulator::projectCameraTrajectory(), vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), vpMbtDistanceLine::updateMovingEdge(), and vpKinect::warpRGBFrame().
|
inlinestatic |
Point coordinates conversion from normalized coordinates in meter to pixel coordinates.
The used formula depends on the projection model of the camera. To know the currently used projection model use vpCameraParameter::get_projModel()
cam | : camera parameters. |
x,y | : input coordinates in meter. |
iP | : output coordinates in pixels. |
In the frame (u,v) the result is given by:
and in the case of perspective projection without distortion.
and with in the case of perspective projection with distortion.
Definition at line 138 of file vpMeterPixelConversion.h.
References vpCameraParameters::perspectiveProjWithDistortion, and vpCameraParameters::perspectiveProjWithoutDistortion.