![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpPixelMeterConversion.h>
Static Public Member Functions | |
Using ViSP camera parameters | |
| |
static void | convertLine (const vpCameraParameters &cam, const double &rho_p, const double &theta_p, double &rho_m, double &theta_m) |
static void | convertMoment (const vpCameraParameters &cam, unsigned int order, const vpMatrix &moment_pixel, vpMatrix &moment_meter) |
static void | convertPoint (const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y) |
static void | convertPoint (const vpCameraParameters &cam, const vpImagePoint &iP, double &x, double &y) |
Using OpenCV camera parameters | |
| |
static void | convertLine (const cv::Mat &cameraMatrix, const double &rho_p, const double &theta_p, double &rho_m, double &theta_m) |
static void | convertMoment (const cv::Mat &cameraMatrix, unsigned int order, const vpMatrix &moment_pixel, vpMatrix &moment_meter) |
static void | convertPoint (const cv::Mat &cameraMatrix, const cv::Mat &distCoeffs, const double &u, const double &v, double &x, double &y) |
static void | convertPoint (const cv::Mat &cameraMatrix, const cv::Mat &distCoeffs, const vpImagePoint &iP, double &x, double &y) |
Various conversion functions to transform primitives (2D line, moments, 2D point) from pixel to normalized coordinates in meter in the image plane.
Tranformation relies either on ViSP camera parameters implemented in vpCameraParameters or on OpenCV camera parameters that are set from a projection matrix and a distorsion coefficients vector.
Definition at line 70 of file vpPixelMeterConversion.h.
|
static |
Line parameters conversion from pixel to normalized coordinates
in meter using OpenCV camera parameters. This function doesn't use distorsion coefficients.
[in] | cameraMatrix | : Camera Matrix ![]() |
[in] | rho_p,theta_p | : Line parameters expressed in pixels. |
[out] | rho_m,theta_m | : Line parameters expressed in meters in the image plane. |
Definition at line 135 of file vpPixelMeterConversion.cpp.
|
static |
Line parameters conversion from pixel to normalized coordinates
in meter using ViSP camera parameters. This function doesn't use distorsion coefficients.
[in] | cam | : camera parameters. |
[in] | rho_p,theta_p | : Line parameters expressed in pixels. |
[out] | rho_m,theta_m | : Line parameters expressed in meters in the image plane. |
Definition at line 58 of file vpPixelMeterConversion.cpp.
|
static |
Moments conversion from pixel to normalized coordinates in meter using OpenCV camera parameters. This function doesn't use distorsion coefficients.
[in] | cameraMatrix | : Camera Matrix ![]() |
[in] | order | : Moment order. |
[in] | moment_pixel | : Moment values in pixels. |
[out] | moment_meter | : Moment values in meters in the image plane. |
Definition at line 166 of file vpPixelMeterConversion.cpp.
|
static |
Moments conversion from pixel to normalized coordinates in meter using ViSP camera parameters. This function doesn't use distorsion coefficients.
[in] | cam | : camera parameters. |
[in] | order | : Moment order. |
[in] | moment_pixel | : Moment values in pixels. |
[out] | moment_meter | : Moment values in meters in the image plane. |
Definition at line 84 of file vpPixelMeterConversion.cpp.
|
static |
Point coordinates conversion from pixel coordinates to normalized coordinates
in meter using OpenCV camera parameters.
[in] | cameraMatrix | : Camera Matrix ![]() |
[in] | distCoeffs | : Input vector of distortion coefficients ![]() |
[in] | u | : input coordinate in pixels along image horizontal axis. |
[in] | v | : input coordinate in pixels along image vertical axis. |
[out] | x | : output coordinate in meter along image plane x-axis. |
[out] | y | : output coordinate in meter along image plane y-axis. |
Definition at line 224 of file vpPixelMeterConversion.cpp.
|
static |
Point coordinates conversion from pixel coordinates to normalized coordinates
in meter using OpenCV camera parameters.
[in] | cameraMatrix | : Camera Matrix ![]() |
[in] | distCoeffs | : Input vector of distortion coefficients ![]() |
[in] | iP | : input coordinates in pixels. |
[out] | x | : output coordinate in meter along image plane x-axis. |
[out] | y | : output coordinate in meter along image plane y-axis. |
Definition at line 248 of file vpPixelMeterConversion.cpp.
|
inlinestatic |
Point coordinates conversion from pixel coordinates to normalized coordinates
in meter using ViSP camera parameters.
The used formula depends on the projection model of the camera. To know the currently used projection model use vpCameraParameter::get_projModel()
[in] | cam | : camera parameters. |
[in] | u | : input coordinate in pixels along image horizontal axis. |
[in] | v | : input coordinate in pixels along image vertical axis. |
[out] | x | : output coordinate in meter along image plane x-axis. |
[out] | y | : output coordinate in meter along image plane y-axis. |
and
in the case of perspective projection without distortion.
and
with
in the case of perspective projection with distortion.
Definition at line 102 of file vpPixelMeterConversion.h.
Referenced by vpMbtFaceDepthNormal::computeDesiredFeatures(), vpMbTracker::initClick(), and vpMbTracker::initFromPoints().
|
inlinestatic |
Point coordinates conversion from pixel coordinates Coordinates in pixel to normalized coordinates in meter using ViSP camera parameters.
The used formula depends on the projection model of the camera. To know the currently used projection model use vpCameraParameter::get_projModel()
[in] | cam | : camera parameters. |
[in] | iP | : input coordinates in pixels. |
[out] | x | : output coordinate in meter along image plane x-axis. |
[out] | y | : output coordinate in meter along image plane y-axis. |
Thanks to the pixel coordinates in the frame (u,v), the meter coordinates are given by :
and
in the case of perspective projection without distortion.
and
with
in the case of perspective projection with distortion.
Definition at line 139 of file vpPixelMeterConversion.h.