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>
241 perspectiveProjWithDistortion
243 } vpCameraParametersProjType;
249 vpCameraParameters(
const double px,
const double py,
const double u0,
const double v0);
250 vpCameraParameters(
const double px,
const double py,
const double u0,
const double v0,
const double kud,
260 void initFromCalibrationMatrix(
const vpMatrix &_K);
261 void initFromFov(
const unsigned int &w,
const unsigned int &h,
const double &hfov,
const double &vfov);
262 void initPersProjWithoutDistortion(
const double px,
const double py,
const double u0,
const double v0);
263 void initPersProjWithDistortion(
const double px,
const double py,
const double u0,
const double v0,
const double kud,
273 inline bool isFovComputed()
const {
return isFov; }
275 void computeFov(
const unsigned int &w,
const unsigned int &h);
284 inline double getHorizontalFovAngle()
const
287 vpTRACE(
"Warning: The FOV is not computed, getHorizontalFovAngle() "
288 "won't be significant.");
300 inline double getVerticalFovAngle()
const
303 vpTRACE(
"Warning: The FOV is not computed, getVerticalFovAngle() won't "
321 inline std::vector<vpColVector> getFovNormals()
const
324 vpTRACE(
"Warning: The FOV is not computed, getFovNormals() won't be "
330 inline double get_px()
const {
return px; }
331 inline double get_px_inverse()
const {
return inv_px; }
332 inline double get_py_inverse()
const {
return inv_py; }
333 inline double get_py()
const {
return py; }
334 inline double get_u0()
const {
return u0; }
335 inline double get_v0()
const {
return v0; }
336 inline double get_kud()
const {
return kud; }
337 inline double get_kdu()
const {
return kdu; }
344 void printParameters();
345 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os,
const vpCameraParameters &cam);
348 static const double DEFAULT_U0_PARAMETER;
349 static const double DEFAULT_V0_PARAMETER;
350 static const double DEFAULT_PX_PARAMETER;
351 static const double DEFAULT_PY_PARAMETER;
352 static const double DEFAULT_KUD_PARAMETER;
353 static const double DEFAULT_KDU_PARAMETER;
354 static const vpCameraParametersProjType DEFAULT_PROJ_TYPE;
366 std::vector<vpColVector> fovNormals;
368 double inv_px, inv_py;
370 vpCameraParametersProjType projModel;