47 #ifndef vpCameraParameters_H
48 #define vpCameraParameters_H
52 #include <visp3/core/vpColVector.h>
53 #include <visp3/core/vpConfig.h>
54 #include <visp3/core/vpDebug.h>
55 #include <visp3/core/vpMatrix.h>
265 perspectiveProjWithoutDistortion,
267 perspectiveProjWithDistortion,
269 ProjWithKannalaBrandtDistortion
271 } vpCameraParametersProjType;
277 vpCameraParameters(
double px,
double py,
double u0,
double v0,
double kud,
double kdu);
278 vpCameraParameters(
double px,
double py,
double u0,
double v0,
const std::vector<double> &distortion_coefficients);
287 void initFromCalibrationMatrix(
const vpMatrix &_K);
288 void initFromFov(
const unsigned int &w,
const unsigned int &h,
const double &hfov,
const double &vfov);
289 void initPersProjWithoutDistortion(
double px,
double py,
double u0,
double v0);
290 void initPersProjWithDistortion(
double px,
double py,
double u0,
double v0,
double kud,
double kdu);
291 void initProjWithKannalaBrandtDistortion(
double px,
double py,
double u0,
double v0,
292 const std::vector<double> &distortion_coefficients);
303 void computeFov(
const unsigned int &w,
const unsigned int &h);
315 vpTRACE(
"Warning: The FOV is not computed, getHorizontalFovAngle() "
316 "won't be significant.");
331 vpTRACE(
"Warning: The FOV is not computed, getVerticalFovAngle() won't "
352 vpTRACE(
"Warning: The FOV is not computed, getFovNormals() won't be "
358 inline double get_px()
const {
return px; }
361 inline double get_py()
const {
return py; }
362 inline double get_u0()
const {
return u0; }
363 inline double get_v0()
const {
return v0; }
373 void printParameters();
374 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os,
const vpCameraParameters &cam);
377 static const double DEFAULT_U0_PARAMETER;
378 static const double DEFAULT_V0_PARAMETER;
379 static const double DEFAULT_PX_PARAMETER;
380 static const double DEFAULT_PY_PARAMETER;
381 static const double DEFAULT_KUD_PARAMETER;
382 static const double DEFAULT_KDU_PARAMETER;
383 static const vpCameraParametersProjType DEFAULT_PROJ_TYPE;
389 std::vector<double> m_dist_coefs;
396 std::vector<vpColVector> fovNormals;
398 double inv_px, inv_py;
400 vpCameraParametersProjType projModel;
Generic class defining intrinsic camera parameters.
std::vector< double > getKannalaBrandtDistortionCoefficients() const
bool isFovComputed() const
vpCameraParametersProjType
std::vector< vpColVector > getFovNormals() const
double getHorizontalFovAngle() const
double getVerticalFovAngle() const
double get_px_inverse() const
double get_py_inverse() const
vpCameraParametersProjType get_projModel() const
Implementation of a matrix and operations on matrices.