49 #ifndef vpCalibration_h
50 #define vpCalibration_h
54 #include <visp3/core/vpCameraParameters.h>
55 #include <visp3/core/vpDisplay.h>
56 #include <visp3/core/vpExponentialMap.h>
57 #include <visp3/core/vpHomogeneousMatrix.h>
58 #include <visp3/core/vpImage.h>
59 #include <visp3/core/vpImagePoint.h>
60 #include <visp3/core/vpMath.h>
61 #include <visp3/core/vpMatrix.h>
62 #include <visp3/vision/vpCalibrationException.h>
83 CALIB_VIRTUAL_VS_DIST,
85 CALIB_LAGRANGE_VIRTUAL_VS,
88 CALIB_LAGRANGE_VIRTUAL_VS_DIST,
91 } vpCalibrationMethodType;
120 int addPoint(
double X,
double Y,
double Z,
vpImagePoint &ip);
125 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
130 vp_deprecated
static void calibrationTsai(
const std::vector<vpHomogeneousMatrix> &cMo,
132 vp_deprecated
static int computeCalibrationTsai(
const std::vector<vpCalibration> &table_cal,
vpHomogeneousMatrix &eMc,
140 void computeStdDeviation(
double &deviation,
double &deviation_dist);
142 bool verbose =
false);
149 int subsampling_factor = 1);
151 int subsampling_factor = 1);
165 int readData(
const char *filename);
166 static int readGrid(
const char *filename,
unsigned int &n, std::list<double> &oX, std::list<double> &oY,
167 std::list<double> &oZ,
bool verbose =
false);
170 static void setLambda(
const double &lambda) { gain = lambda; }
171 void setAspectRatio(
double aspect_ratio);
172 int writeData(
const char *filename);
182 bool verbose =
false,
double aspect_ratio = -1);
183 static void calibVVSMulti(std::vector<vpCalibration> &table_cal,
vpCameraParameters &cam,
184 double &globalReprojectionError,
bool verbose =
false,
double aspect_ratio = -1);
187 bool verbose =
false,
double aspect_ratio = -1);
188 static void calibVVSWithDistortionMulti(std::vector<vpCalibration> &table_cal,
vpCameraParameters &cam,
189 double &globalReprojectionError,
bool verbose =
false,
190 double aspect_ratio = -1);
194 std::list<double> LoX, LoY,
196 std::list<vpImagePoint> Lip;
199 double residual_dist;
202 static double threshold;
203 static unsigned int nbIterMax;
Tools for perspective camera calibration.
static void setLambda(const double &lambda)
set the gain for the virtual visual servoing algorithm
static double getLambda()
Set the gain for the virtual visual servoing algorithm.
unsigned int get_npt() const
get the number of points
double m_aspect_ratio
Fix aspect ratio (px/py)
double getResidual(void) const
get the residual in pixels
vpHomogeneousMatrix eMc_dist
Position of the camera in end-effector frame using camera parameters with distorsion.
vpHomogeneousMatrix rMe
reference coordinates (manipulator base coordinates)
vpHomogeneousMatrix cMo
(as a 3x4 matrix [R T])
vpCameraParameters cam_dist
projection model with distortion
double getResidual_dist(void) const
get the residual for perspective projection with distortion (in pixels)
vpHomogeneousMatrix eMc
Position of the camera in end-effector frame using camera parameters without distorsion.
vpHomogeneousMatrix cMo_dist
vpCameraParameters cam
projection model without distortion
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionnalities.
static const vpColor yellow
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...