ViSP  2.9.0

#include <vpMeterPixelConversion.h>

Static Public Member Functions

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)
 
static void convertPointWithoutDistortion (const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
 
static void convertPointWithoutDistortion (const vpCameraParameters &cam, const double &x, const double &y, vpImagePoint &iP)
 
static void convertPointWithDistortion (const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
 
static void convertPointWithDistortion (const vpCameraParameters &cam, const double &x, const double &y, vpImagePoint &iP)
 
static void convertLine (const vpCameraParameters &cam, const double &rho_m, const double &theta_m, double &rho_p, double &theta_p)
 

Detailed Description

Conversion from normalized coordinates $(x,y)$ in meter to pixel coordinates $(u,v)$.

This class relates to vpCameraParameters.

Definition at line 70 of file vpMeterPixelConversion.h.

Member Function Documentation

void vpMeterPixelConversion::convertLine ( const vpCameraParameters cam,
const double &  rho_m,
const double &  theta_m,
double &  rho_p,
double &  theta_p 
)
static
static void vpMeterPixelConversion::convertPoint ( const vpCameraParameters cam,
const double &  x,
const double &  y,
double &  u,
double &  v 
)
inlinestatic

Point coordinates conversion from normalized coordinates $(x,y)$ in meter to pixel coordinates $(u,v)$.

The used formula depends on the projection model of the camera. To know the currently used projection model use vpCameraParameter::get_projModel()

Parameters
cam: camera parameters.
x,y: input coordinates in meter.
u,v: output coordinates in pixels.

$ u = x*p_x + u_0 $ and $ v = y*p_y + v_0 $ in the case of perspective projection without distortion.

$ u = x*p_x*(1+k_{ud}*r^2)+u_0 $ and $ v = y*p_y*(1+k_{ud}*r^2)+v_0 $ with $ r^2 = x^2+y^2 $ in the case of perspective projection with distortion.

Examples:
tutorial-homography-from-points.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, and tutorial-ibvs-4pts-wireframe-robot-viper.cpp.

Definition at line 96 of file vpMeterPixelConversion.h.

References vpCameraParameters::perspectiveProjWithDistortion, and vpCameraParameters::perspectiveProjWithoutDistortion.

Referenced by vpPolygon::buildFrom(), vpFeatureBuilder::create(), vpFeatureSegment::display(), vpMbtDistanceLine::display(), vpProjectionDisplay::display(), vpProjectionDisplay::displayCamera(), vpDisplay::displayCamera(), vpFeatureDisplay::displayEllipse(), vpDisplay::displayFrame(), vpPose::displayModel(), vpFeatureDisplay::displayPoint(), vpMbtPolygon::getNbCornerInsideImage(), vpMbtPolygon::getRoi(), vpMbtPolygon::getRoiClipped(), vpMbtDistanceLine::initMovingEdge(), vpWireFrameSimulator::projectCameraTrajectory(), vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), vpMbtDistanceLine::updateMovingEdge(), and vpKinect::warpRGBFrame().

static void vpMeterPixelConversion::convertPoint ( const vpCameraParameters cam,
const double &  x,
const double &  y,
vpImagePoint iP 
)
inlinestatic

Point coordinates conversion from normalized coordinates $(x,y)$ 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()

Parameters
cam: camera parameters.
x,y: input coordinates in meter.
iP: output coordinates in pixels.

In the frame (u,v) the result is given by:

$ u = x*p_x + u_0 $ and $ v = y*p_y + v_0 $ in the case of perspective projection without distortion.

$ u = x*p_x*(1+k_{ud}*r^2)+u_0 $ and $ v = y*p_y*(1+k_{ud}*r^2)+v_0 $ with $ r^2 = x^2+y^2 $ in the case of perspective projection with distortion.

Definition at line 135 of file vpMeterPixelConversion.h.

References vpCameraParameters::perspectiveProjWithDistortion, and vpCameraParameters::perspectiveProjWithoutDistortion.

static void vpMeterPixelConversion::convertPointWithDistortion ( const vpCameraParameters cam,
const double &  x,
const double &  y,
double &  u,
double &  v 
)
inlinestatic

Point coordinates conversion with distortion from normalized coordinates $(x,y)$ in meter to pixel coordinates $(u,v)$.

Parameters
cam: camera parameters.
x,y: input coordinates in meter.
u,v: output coordinates in pixels.

$ u = x*p_x*(1+k_{ud}*r^2)+u_0 $ and $ v = y*p_y*(1+k_{ud}*r^2)+v_0 $ with $ r^2 = x^2+y^2 $

Definition at line 204 of file vpMeterPixelConversion.h.

static void vpMeterPixelConversion::convertPointWithDistortion ( const vpCameraParameters cam,
const double &  x,
const double &  y,
vpImagePoint iP 
)
inlinestatic

Point coordinates conversion with distortion from normalized coordinates $(x,y)$ in meter to pixel coordinates.

Parameters
cam: camera parameters.
x,y: input coordinates in meter.
iP: output coordinates in pixels.

In the frame (u,v) the result is given by:

$ u = x*p_x*(1+k_{ud}*r^2)+u_0 $ and $ v = y*p_y*(1+k_{ud}*r^2)+v_0 $ with $ r^2 = x^2+y^2 $

Definition at line 230 of file vpMeterPixelConversion.h.

References vpImagePoint::set_u(), and vpImagePoint::set_v().

static void vpMeterPixelConversion::convertPointWithoutDistortion ( const vpCameraParameters cam,
const double &  x,
const double &  y,
double &  u,
double &  v 
)
inlinestatic

Point coordinates conversion without distortion from normalized coordinates $(x,y)$ in meter to pixel coordinates $(u,v)$.

$ u = x*p_x+u_0 $ and $ v = y*p_y+v_0 $

Definition at line 160 of file vpMeterPixelConversion.h.

static void vpMeterPixelConversion::convertPointWithoutDistortion ( const vpCameraParameters cam,
const double &  x,
const double &  y,
vpImagePoint iP 
)
inlinestatic

Point coordinates conversion without distortion from normalized coordinates $(x,y)$ in meter to pixel coordinates.

In the frame (u,v) the result is given by:

$ u = x*p_x+u_0 $ and $ v = y*p_y+v_0 $

Definition at line 180 of file vpMeterPixelConversion.h.

References vpImagePoint::set_u(), and vpImagePoint::set_v().