ViSP
2.10.0
|
#include <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 71 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 99 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 56 of file vpMeterPixelConversion.cpp.
References vpException::divideByZeroError, vpMath::sqr(), and vpERROR_TRACE.
Referenced by 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 104 of file vpMeterPixelConversion.h.
References vpCameraParameters::perspectiveProjWithDistortion, and vpCameraParameters::perspectiveProjWithoutDistortion.
Referenced by vpPolygon::buildFrom(), convertEllipse(), vpFeatureBuilder::create(), vpFeatureSegment::display(), vpMbtDistanceLine::display(), vpProjectionDisplay::display(), vpProjectionDisplay::displayCamera(), vpDisplay::displayCamera(), vpFeatureDisplay::displayEllipse(), vpDisplay::displayFrame(), vpPose::displayModel(), vpFeatureDisplay::displayPoint(), vpMbtPolygon::getNbCornerInsideImage(), vpMbTracker::getPolygonFaces(), vpMbtPolygon::getRoi(), vpMbtPolygon::getRoiClipped(), vpMbtDistanceLine::initMovingEdge(), vpKeyPoint::matchPoint(), 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 142 of file vpMeterPixelConversion.h.
References vpCameraParameters::perspectiveProjWithDistortion, and vpCameraParameters::perspectiveProjWithoutDistortion.