Parameters of the camera.
More...
#include <cameraparameters.h>
|
| | CameraParameters () |
| |
| | CameraParameters () |
| |
| | CameraParameters (cv::Mat cameraMatrix, cv::Mat distorsionCoeff, cv::Size size) throw (cv::Exception) |
| |
| | CameraParameters (cv::Mat cameraMatrix, cv::Mat distorsionCoeff, cv::Size size) throw (cv::Exception) |
| |
| | CameraParameters (const CameraParameters &CI) |
| |
| | CameraParameters (const CameraParameters &CI) |
| |
| void | glGetProjectionMatrix (cv::Size orgImgSize, cv::Size size, double proj_matrix[16], double gnear, double gfar, bool invert=false) throw (cv::Exception) |
| |
| void | glGetProjectionMatrix (cv::Size orgImgSize, cv::Size size, double proj_matrix[16], double gnear, double gfar, bool invert=false) throw (cv::Exception) |
| |
| bool | isValid () const |
| |
| bool | isValid () const |
| |
| void | OgreGetProjectionMatrix (cv::Size orgImgSize, cv::Size size, double proj_matrix[16], double gnear, double gfar, bool invert=false) throw (cv::Exception) |
| |
| void | OgreGetProjectionMatrix (cv::Size orgImgSize, cv::Size size, double proj_matrix[16], double gnear, double gfar, bool invert=false) throw (cv::Exception) |
| |
| CameraParameters & | operator= (const CameraParameters &CI) |
| |
| CameraParameters & | operator= (const CameraParameters &CI) |
| |
| void | readFromFile (string path) throw (cv::Exception) |
| |
| void | readFromFile (string path) throw (cv::Exception) |
| |
| void | readFromXMLFile (string filePath) throw (cv::Exception) |
| |
| void | readFromXMLFile (string filePath) throw (cv::Exception) |
| |
| void | resize (cv::Size size) throw (cv::Exception) |
| |
| void | resize (cv::Size size) throw (cv::Exception) |
| |
| void | saveToFile (string path, bool inXML=true) throw (cv::Exception) |
| |
| void | saveToFile (string path, bool inXML=true) throw (cv::Exception) |
| |
| void | setParams (cv::Mat cameraMatrix, cv::Mat distorsionCoeff, cv::Size size) throw (cv::Exception) |
| |
| void | setParams (cv::Mat cameraMatrix, cv::Mat distorsionCoeff, cv::Size size) throw (cv::Exception) |
| |
|
| static void | argConvGLcpara2 (double cparam[3][4], int width, int height, double gnear, double gfar, double m[16], bool invert) throw (cv::Exception) |
| |
| static void | argConvGLcpara2 (double cparam[3][4], int width, int height, double gnear, double gfar, double m[16], bool invert) throw (cv::Exception) |
| |
| static int | arParamDecompMat (double source[3][4], double cpara[3][4], double trans[3][4]) throw (cv::Exception) |
| |
| static int | arParamDecompMat (double source[3][4], double cpara[3][4], double trans[3][4]) throw (cv::Exception) |
| |
| static double | dot (double a1, double a2, double a3, double b1, double b2, double b3) |
| |
| static double | dot (double a1, double a2, double a3, double b1, double b2, double b3) |
| |
| static double | norm (double a, double b, double c) |
| |
| static double | norm (double a, double b, double c) |
| |
Parameters of the camera.
Definition at line 39 of file aruco/include/aruco/cameraparameters.h.
| aruco::CameraParameters::CameraParameters |
( |
| ) |
|
| aruco::CameraParameters::CameraParameters |
( |
cv::Mat |
cameraMatrix, |
|
|
cv::Mat |
distorsionCoeff, |
|
|
cv::Size |
size |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
Creates the object from the info passed
- Parameters
-
| cameraMatrix | 3x3 matrix (fx 0 cx, 0 fy cy, 0 0 1) |
| distorsionCoeff | 4x1 matrix (k1,k2,p1,p2) |
| size | image size |
Definition at line 47 of file aruco/src/aruco/cameraparameters.cpp.
| aruco::CameraParameters::CameraParameters |
( |
| ) |
|
| aruco::CameraParameters::CameraParameters |
( |
cv::Mat |
cameraMatrix, |
|
|
cv::Mat |
distorsionCoeff, |
|
|
cv::Size |
size |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
Creates the object from the info passed
- Parameters
-
| cameraMatrix | 3x3 matrix (fx 0 cx, 0 fy cy, 0 0 1) |
| distorsionCoeff | 4x1 matrix (k1,k2,p1,p2) |
| size | image size |
| void aruco::CameraParameters::argConvGLcpara2 |
( |
double |
cparam[3][4], |
|
|
int |
width, |
|
|
int |
height, |
|
|
double |
gnear, |
|
|
double |
gfar, |
|
|
double |
m[16], |
|
|
bool |
invert |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
|
staticprivate |
| static void aruco::CameraParameters::argConvGLcpara2 |
( |
double |
cparam[3][4], |
|
|
int |
width, |
|
|
int |
height, |
|
|
double |
gnear, |
|
|
double |
gfar, |
|
|
double |
m[16], |
|
|
bool |
invert |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
|
staticprivate |
| int aruco::CameraParameters::arParamDecompMat |
( |
double |
source[3][4], |
|
|
double |
cpara[3][4], |
|
|
double |
trans[3][4] |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
|
staticprivate |
| static int aruco::CameraParameters::arParamDecompMat |
( |
double |
source[3][4], |
|
|
double |
cpara[3][4], |
|
|
double |
trans[3][4] |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
|
staticprivate |
| double aruco::CameraParameters::dot |
( |
double |
a1, |
|
|
double |
a2, |
|
|
double |
a3, |
|
|
double |
b1, |
|
|
double |
b2, |
|
|
double |
b3 |
|
) |
| |
|
staticprivate |
| static double aruco::CameraParameters::dot |
( |
double |
a1, |
|
|
double |
a2, |
|
|
double |
a3, |
|
|
double |
b1, |
|
|
double |
b2, |
|
|
double |
b3 |
|
) |
| |
|
staticprivate |
| cv::Point3f aruco::CameraParameters::getCameraLocation |
( |
cv::Mat |
Rvec, |
|
|
cv::Mat |
Tvec |
|
) |
| |
|
static |
Returns the location of the camera in the reference system given by the rotation and translation vectors passed NOT TESTED
Definition at line 89 of file aruco/src/aruco/cameraparameters.cpp.
| static cv::Point3f aruco::CameraParameters::getCameraLocation |
( |
cv::Mat |
Rvec, |
|
|
cv::Mat |
Tvec |
|
) |
| |
|
static |
Returns the location of the camera in the reference system given by the rotation and translation vectors passed NOT TESTED
| void aruco::CameraParameters::glGetProjectionMatrix |
( |
cv::Size |
orgImgSize, |
|
|
cv::Size |
size, |
|
|
double |
proj_matrix[16], |
|
|
double |
gnear, |
|
|
double |
gfar, |
|
|
bool |
invert = false |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
Given the intrinsic camera parameters returns the GL_PROJECTION matrix for opengl. PLease NOTE that when using OpenGL, it is assumed no camera distorsion! So, if it is not true, you should have undistor image
- Parameters
-
| orgImgSize | size of the original image |
| size | of the image/window where to render (can be different from the real camera image). Please not that it must be related to CamMatrix |
| proj_matrix | output projection matrix to give to opengl |
| gnear,gfar | visible rendering range |
| invert | indicates if the output projection matrix has to yield a horizontally inverted image because image data has not been stored in the order of glDrawPixels: bottom-to-top. |
| void aruco::CameraParameters::glGetProjectionMatrix |
( |
cv::Size |
orgImgSize, |
|
|
cv::Size |
size, |
|
|
double |
proj_matrix[16], |
|
|
double |
gnear, |
|
|
double |
gfar, |
|
|
bool |
invert = false |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
Given the intrinsic camera parameters returns the GL_PROJECTION matrix for opengl. PLease NOTE that when using OpenGL, it is assumed no camera distorsion! So, if it is not true, you should have undistor image
- Parameters
-
| orgImgSize | size of the original image |
| size | of the image/window where to render (can be different from the real camera image). Please not that it must be related to CamMatrix |
| proj_matrix | output projection matrix to give to opengl |
| gnear,gfar | visible rendering range |
| invert | indicates if the output projection matrix has to yield a horizontally inverted image because image data has not been stored in the order of glDrawPixels: bottom-to-top. |
Definition at line 220 of file aruco/src/aruco/cameraparameters.cpp.
| bool aruco::CameraParameters::isValid |
( |
| ) |
const |
|
inline |
| bool aruco::CameraParameters::isValid |
( |
| ) |
const |
|
inline |
| double aruco::CameraParameters::norm |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c |
|
) |
| |
|
staticprivate |
| static double aruco::CameraParameters::norm |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c |
|
) |
| |
|
staticprivate |
| void aruco::CameraParameters::OgreGetProjectionMatrix |
( |
cv::Size |
orgImgSize, |
|
|
cv::Size |
size, |
|
|
double |
proj_matrix[16], |
|
|
double |
gnear, |
|
|
double |
gfar, |
|
|
bool |
invert = false |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
setup camera for an Ogre project. Use: ... Ogre::Matrix4 PM(proj_matrix[0], proj_matrix[1], ... , proj_matrix[15]); yourCamera->setCustomProjectionMatrix(true, PM); yourCamera->setCustomViewMatrix(true, Ogre::Matrix4::IDENTITY); ... As in OpenGL, it assumes no camera distorsion
Definition at line 422 of file aruco/src/aruco/cameraparameters.cpp.
| void aruco::CameraParameters::OgreGetProjectionMatrix |
( |
cv::Size |
orgImgSize, |
|
|
cv::Size |
size, |
|
|
double |
proj_matrix[16], |
|
|
double |
gnear, |
|
|
double |
gfar, |
|
|
bool |
invert = false |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
setup camera for an Ogre project. Use: ... Ogre::Matrix4 PM(proj_matrix[0], proj_matrix[1], ... , proj_matrix[15]); yourCamera->setCustomProjectionMatrix(true, PM); yourCamera->setCustomViewMatrix(true, Ogre::Matrix4::IDENTITY); ... As in OpenGL, it assumes no camera distorsion
| void aruco::CameraParameters::readFromFile |
( |
string |
path | ) |
|
| throw | ( | cv::Exception |
| ) | | |
| void aruco::CameraParameters::readFromFile |
( |
string |
path | ) |
|
| throw | ( | cv::Exception |
| ) | | |
Reads the camera parameters from a file generated using saveToFile.
| void aruco::CameraParameters::readFromXMLFile |
( |
string |
filePath | ) |
|
| throw | ( | cv::Exception |
| ) | | |
Reads from a YAML file generated with the opencv2.2 calibration utility
| void aruco::CameraParameters::readFromXMLFile |
( |
string |
filePath | ) |
|
| throw | ( | cv::Exception |
| ) | | |
| void aruco::CameraParameters::resize |
( |
cv::Size |
size | ) |
|
| throw | ( | cv::Exception |
| ) | | |
Adjust the parameters to the size of the image indicated
| void aruco::CameraParameters::resize |
( |
cv::Size |
size | ) |
|
| throw | ( | cv::Exception |
| ) | | |
| void aruco::CameraParameters::saveToFile |
( |
string |
path, |
|
|
bool |
inXML = true |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
| void aruco::CameraParameters::saveToFile |
( |
string |
path, |
|
|
bool |
inXML = true |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
| void aruco::CameraParameters::setParams |
( |
cv::Mat |
cameraMatrix, |
|
|
cv::Mat |
distorsionCoeff, |
|
|
cv::Size |
size |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
Sets the parameters
- Parameters
-
| cameraMatrix | 3x3 matrix (fx 0 cx, 0 fy cy, 0 0 1) |
| distorsionCoeff | 4x1 matrix (k1,k2,p1,p2) |
| size | image size |
Definition at line 68 of file aruco/src/aruco/cameraparameters.cpp.
| void aruco::CameraParameters::setParams |
( |
cv::Mat |
cameraMatrix, |
|
|
cv::Mat |
distorsionCoeff, |
|
|
cv::Size |
size |
|
) |
| |
| throw | ( | cv::Exception |
| ) | | |
Sets the parameters
- Parameters
-
| cameraMatrix | 3x3 matrix (fx 0 cx, 0 fy cy, 0 0 1) |
| distorsionCoeff | 4x1 matrix (k1,k2,p1,p2) |
| size | image size |
| cv::Mat aruco::CameraParameters::CameraMatrix |
| cv::Size aruco::CameraParameters::CamSize |
| cv::Mat aruco::CameraParameters::Distorsion |
The documentation for this class was generated from the following files: