Basic Image AlgorithmS Library
2.8.0
|
#include <Image/CameraParam.hh>
Public Member Functions | |
CameraParam () | |
CameraParam (const CameraParam &cp) | |
CameraParam (const KMatrix &K, const int w, const int h) | |
pass K and image dims to construct a simple parameter file More... | |
CameraParam (const std::string &filename) | |
void | DebugOut () const |
std::vector< double > | GetAngleCorrX () const |
std::vector< double > | GetAngleCorrY () const |
double | GetAspectratio () const |
double | GetAspectRatio () const |
const CameraData | GetCameraData () const |
int | GetCamID () const |
double | GetCellSizeX () |
double | GetCellSizeY () |
void | GetDefaultUndistortion (double &f, double &kc1, double &kc2, double &kc3, double &kc4) const |
double | GetDownsamplingFactor () |
double | GetFocalLength () const |
Get the current camera focal length. More... | |
unsigned int | GetHeight () const |
get camera image height. More... | |
std::vector< double > | GetIlluCorrX () const |
std::vector< double > | GetIlluCorrY () const |
BIAS::KMatrix | GetKMatrix () const |
double | GetPrincipalX () const |
get principal point, x in pixels relative to top left corner More... | |
double | GetPrincipalY () const |
get principal point, y in pixels relative to top left corner More... | |
double | GetRadius () const |
unsigned int | GetWidth () const |
get camera image width. More... | |
double | GetZoom () const |
Set the current camera zoom, the focal length will be calculated. More... | |
void | GetZoomUndistortion (std::vector< CPDiscreteParam > &vp) const |
void | Init () |
void | Init (const CameraParam &cp) |
int | Init (const std::string &filename) |
int | Init (XMLIO &myXML, xmlNodePtr &cameraNode) |
void | InitPerspective (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double focallength, const double aspectratio, const double k1, const double k2, const double k3, const double k4, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) |
void | InitSpherical (const std::string CamModel, const int CamID, const std::string LensModel, const int imgWidth, const int imgHeight, const double principalX, const double principalY, const double radius, const std::vector< double > &AngleCorrX, const std::vector< double > &AngleCorrY, const std::vector< double > &IlluCorrX, const std::vector< double > &IlluCorrY) |
bool | IsPerspective () const |
bool | IsSpherical () const |
bool | IsZoomCamera () const |
True, if camera has a zoom lens. More... | |
int | ReadCameraData (const std::string &Filename) |
Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class. More... | |
int | ReadFromEXIF (const std::string &filename) |
read jpeg EXIF header and set camera parameter More... | |
void | SetCameraData (const CameraData &cd) |
void | SetCellSize (const double CellSizeX, const double AspectRatio) |
Set CCD cell-size in meter. More... | |
void | SetData_EVID31_147094 () |
Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class. More... | |
void | SetData_OMNITECH_ORIFL_190_3 () |
void | SetDownsampling (const double factor) |
Set downsampling factor - all get functions will return transformed values. More... | |
void | SetFocalLength (const double f) |
Set the current camera focal length, the zoom will be calculated. More... | |
void | SetPrincipal (const double x, const double y) |
Set principal point in pixels relative to top left corner. More... | |
double | SetRadius (double r) |
void | SetSize (unsigned int w, unsigned int h) |
set size of image seperatly More... | |
void | SetUnzoomed () |
Set the zoom and focal length of a zoom camera to the default settings. More... | |
void | SetZoom (const double abszoom) |
Set the current camera zoom, the focal length will be calculated. More... | |
void | SetZoomCamera (const bool zoomCam) |
Set to 'true', if camera has a zoom lens. More... | |
int | WriteCameraData (const std::string &Filename) const |
Write all data to a camera data parameter file ) More... | |
~CameraParam () | |
Protected Member Functions | |
double | InterpolateAbsZoom_ () |
double | InterpolateFocalLength_ () |
Protected Attributes | |
CameraData | cd_ |
double | downsamplingFactor_ |
double | focallengthZoom_ |
double | zoom_ |
Definition at line 48 of file CameraParam.hh.
CameraParam::CameraParam | ( | ) |
Definition at line 57 of file CameraParam.cpp.
CameraParam::CameraParam | ( | const CameraParam & | cp | ) |
Definition at line 62 of file CameraParam.cpp.
CameraParam::CameraParam | ( | const KMatrix & | K, |
const int | w, | ||
const int | h | ||
) |
pass K and image dims to construct a simple parameter file
Definition at line 462 of file CameraParam.cpp.
References BIAS::ProjectionParametersIO::SetFromKMatrix().
CameraParam::CameraParam | ( | const std::string & | filename | ) |
Definition at line 68 of file CameraParam.cpp.
CameraParam::~CameraParam | ( | ) |
Definition at line 82 of file CameraParam.cpp.
void CameraParam::DebugOut | ( | ) | const |
Definition at line 405 of file CameraParam.cpp.
References BIAS::CPDiscreteParam::focallength, BIAS::CPDiscreteParam::kc1, BIAS::CPDiscreteParam::kc2, BIAS::CPDiscreteParam::kc3, BIAS::CPDiscreteParam::kc4, and BIAS::CPDiscreteParam::zoom.
|
inline |
Definition at line 232 of file CameraParam.hh.
|
inline |
Definition at line 235 of file CameraParam.hh.
|
inline |
Definition at line 158 of file CameraParam.hh.
|
inline |
Definition at line 224 of file CameraParam.hh.
|
inline |
Definition at line 284 of file CameraParam.hh.
Referenced by Init().
|
inline |
Definition at line 178 of file CameraParam.hh.
|
inline |
Definition at line 133 of file CameraParam.hh.
|
inline |
Definition at line 134 of file CameraParam.hh.
|
inline |
Definition at line 201 of file CameraParam.hh.
double CameraParam::GetDownsamplingFactor | ( | ) |
Definition at line 255 of file CameraParam.cpp.
double CameraParam::GetFocalLength | ( | ) | const |
Get the current camera focal length.
Definition at line 242 of file CameraParam.cpp.
unsigned int CameraParam::GetHeight | ( | ) | const |
get camera image height.
Definition at line 201 of file CameraParam.cpp.
Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().
|
inline |
Definition at line 238 of file CameraParam.hh.
Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().
|
inline |
Definition at line 241 of file CameraParam.hh.
Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().
KMatrix CameraParam::GetKMatrix | ( | ) | const |
Definition at line 172 of file CameraParam.cpp.
References BIAS::Matrix3x3< T >::SetIdentity().
double CameraParam::GetPrincipalX | ( | ) | const |
get principal point, x in pixels relative to top left corner
Definition at line 193 of file CameraParam.cpp.
Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().
double CameraParam::GetPrincipalY | ( | ) | const |
get principal point, y in pixels relative to top left corner
Definition at line 197 of file CameraParam.cpp.
Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().
|
inline |
Definition at line 182 of file CameraParam.hh.
unsigned int CameraParam::GetWidth | ( | ) | const |
get camera image width.
Definition at line 205 of file CameraParam.cpp.
Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().
double CameraParam::GetZoom | ( | ) | const |
Set the current camera zoom, the focal length will be calculated.
Definition at line 230 of file CameraParam.cpp.
|
inline |
Definition at line 212 of file CameraParam.hh.
References BIAS::CPDiscreteParam::focallength.
void CameraParam::Init | ( | ) |
Definition at line 86 of file CameraParam.cpp.
void CameraParam::Init | ( | const CameraParam & | cp | ) |
Definition at line 115 of file CameraParam.cpp.
References downsamplingFactor_, and GetCameraData().
int CameraParam::Init | ( | const std::string & | filename | ) |
Definition at line 152 of file CameraParam.cpp.
References BIAS::ProjectionParametersIO::ReadCameraData().
int BIAS::CameraParam::Init | ( | XMLIO & | myXML, |
xmlNodePtr & | cameraNode | ||
) |
void CameraParam::InitPerspective | ( | const std::string | CamModel, |
const int | CamID, | ||
const std::string | LensModel, | ||
const int | imgWidth, | ||
const int | imgHeight, | ||
const double | principalX, | ||
const double | principalY, | ||
const double | focallength, | ||
const double | aspectratio, | ||
const double | k1, | ||
const double | k2, | ||
const double | k3, | ||
const double | k4, | ||
const std::vector< double > & | IlluCorrX, | ||
const std::vector< double > & | IlluCorrY | ||
) |
Definition at line 372 of file CameraParam.cpp.
void CameraParam::InitSpherical | ( | const std::string | CamModel, |
const int | CamID, | ||
const std::string | LensModel, | ||
const int | imgWidth, | ||
const int | imgHeight, | ||
const double | principalX, | ||
const double | principalY, | ||
const double | radius, | ||
const std::vector< double > & | AngleCorrX, | ||
const std::vector< double > & | AngleCorrY, | ||
const std::vector< double > & | IlluCorrX, | ||
const std::vector< double > & | IlluCorrY | ||
) |
Definition at line 334 of file CameraParam.cpp.
|
protected |
Definition at line 523 of file CameraParam.cpp.
|
protected |
Definition at line 483 of file CameraParam.cpp.
|
inline |
Definition at line 230 of file CameraParam.hh.
|
inline |
Definition at line 228 of file CameraParam.hh.
bool CameraParam::IsZoomCamera | ( | ) | const |
True, if camera has a zoom lens.
Definition at line 226 of file CameraParam.cpp.
int CameraParam::ReadCameraData | ( | const std::string & | Filename | ) |
Add a camera sub-tree-structure to an allready created XML-tree and write the data from (*this) into the tree - called from the rig parameter class.
myXML | points to the XML-Tree |
cameraDataNode | points to a "CameraData"-node to append the "Camera"-node |
Filename | Name of the XML-camera-data-file, document tag has to be "Camera" |
Definition at line 319 of file CameraParam.cpp.
References BIAS::ProjectionParametersIO::ReadCameraData().
int CameraParam::ReadFromEXIF | ( | const std::string & | filename | ) |
read jpeg EXIF header and set camera parameter
Definition at line 453 of file CameraParam.cpp.
References BIAS::ProjectionParametersIO::ReadFromEXIF().
|
inline |
Definition at line 288 of file CameraParam.hh.
void CameraParam::SetCellSize | ( | const double | CellSizeX, |
const double | AspectRatio | ||
) |
Set CCD cell-size in meter.
AspectRatio is CS_Y/CS_X
Definition at line 209 of file CameraParam.cpp.
void CameraParam::SetData_EVID31_147094 | ( | ) |
Read a camera data form a precreated XML-tree and store the data in (*this) - called from the rig parameter class.
myXML | points to the XML-Tree |
rigNode | points to a "Camera"-node to evaluate |
Definition at line 476 of file CameraParam.cpp.
References BIAS::ProjectionParametersIO::SetData_EVID31_147094().
void CameraParam::SetData_OMNITECH_ORIFL_190_3 | ( | ) |
Definition at line 469 of file CameraParam.cpp.
References BIAS::ProjectionParametersIO::SetData_OMNITECH_ORIFL_190_3().
void CameraParam::SetDownsampling | ( | const double | factor | ) |
Set downsampling factor - all get functions will return transformed values.
E.g. if your image size(width and height) is half the original and the field of view did stay the same, then set factor to 2.
CAUTION: The Set-functions still require the original values
Definition at line 284 of file CameraParam.cpp.
void CameraParam::SetFocalLength | ( | const double | f | ) |
Set the current camera focal length, the zoom will be calculated.
Definition at line 272 of file CameraParam.cpp.
void CameraParam::SetPrincipal | ( | const double | x, |
const double | y | ||
) |
Set principal point in pixels relative to top left corner.
Definition at line 188 of file CameraParam.cpp.
|
inline |
Definition at line 190 of file CameraParam.hh.
|
inline |
set size of image seperatly
Definition at line 163 of file CameraParam.hh.
void CameraParam::SetUnzoomed | ( | ) |
Set the zoom and focal length of a zoom camera to the default settings.
Definition at line 288 of file CameraParam.cpp.
void CameraParam::SetZoom | ( | const double | abszoom | ) |
Set the current camera zoom, the focal length will be calculated.
Definition at line 259 of file CameraParam.cpp.
void CameraParam::SetZoomCamera | ( | const bool | zoomCam | ) |
Set to 'true', if camera has a zoom lens.
Definition at line 221 of file CameraParam.cpp.
int CameraParam::WriteCameraData | ( | const std::string & | Filename | ) | const |
Write all data to a camera data parameter file )
Filename | Name of the XML-camera-data-file, document tag will be to be "Camera" |
Definition at line 302 of file CameraParam.cpp.
References BIAS::ProjectionParametersIO::WriteCameraData().
|
protected |
Definition at line 293 of file CameraParam.hh.
|
protected |
Definition at line 296 of file CameraParam.hh.
Referenced by Init().
|
protected |
Definition at line 303 of file CameraParam.hh.
|
protected |
Definition at line 302 of file CameraParam.hh.