Visual Servoing Platform
version 3.1.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 66 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 92 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 | : input coordinate in meter along image plane x-axis. |
y | : input coordinate in meter along image plane y-axis. |
u | : output coordinate in pixels along image horizontal axis. |
v | : output coordinate in pixels along image vertical axis. |
and in the case of perspective projection without distortion.
and with in the case of perspective projection with distortion.
Definition at line 98 of file vpMeterPixelConversion.h.
References vpCameraParameters::perspectiveProjWithDistortion, and vpCameraParameters::perspectiveProjWithoutDistortion.
Referenced by vpPolygon::buildFrom(), vpKeyPoint::computePose(), vpMbtFaceDepthDense::computeROI(), vpMbtFaceDepthNormal::computeROI(), convertEllipse(), vpFeatureBuilder::create(), vpFeatureSegment::display(), vpProjectionDisplay::display(), vpMbtDistanceLine::display(), vpMbtDistanceKltPoints::display(), vpProjectionDisplay::displayCamera(), vpFeatureDisplay::displayEllipse(), vpMbtFaceDepthNormal::displayFeature(), vpPose::displayModel(), vpFeatureDisplay::displayPoint(), vpPolygon3D::getNbCornerInsideImage(), vpPolygon3D::getRoi(), vpPolygon3D::getRoiClipped(), vpImageSimulator::init(), 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 | : input coordinate in meter along image plane x-axis. |
y | : input coordinate in meter along image plane y-axis. |
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 134 of file vpMeterPixelConversion.h.
References vpCameraParameters::perspectiveProjWithDistortion, vpCameraParameters::perspectiveProjWithoutDistortion, vpImagePoint::set_u(), and vpImagePoint::set_v().