Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::CameraParam Class Reference

#include <Image/CameraParam.hh>

+ Collaboration diagram for BIAS::CameraParam:

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_
 

Detailed Description

Examples:
ExampleCameraParam.cpp.

Definition at line 48 of file CameraParam.hh.

Constructor & Destructor Documentation

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.

Member Function Documentation

void CameraParam::DebugOut ( ) const
std::vector<double> BIAS::CameraParam::GetAngleCorrX ( ) const
inline

Definition at line 232 of file CameraParam.hh.

std::vector<double> BIAS::CameraParam::GetAngleCorrY ( ) const
inline

Definition at line 235 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectratio ( ) const
inline

Definition at line 158 of file CameraParam.hh.

double BIAS::CameraParam::GetAspectRatio ( ) const
inline

Definition at line 224 of file CameraParam.hh.

const CameraData BIAS::CameraParam::GetCameraData ( ) const
inline

Definition at line 284 of file CameraParam.hh.

Referenced by Init().

int BIAS::CameraParam::GetCamID ( ) const
inline

Definition at line 178 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeX ( )
inline

Definition at line 133 of file CameraParam.hh.

double BIAS::CameraParam::GetCellSizeY ( )
inline

Definition at line 134 of file CameraParam.hh.

void BIAS::CameraParam::GetDefaultUndistortion ( double &  f,
double &  kc1,
double &  kc2,
double &  kc3,
double &  kc4 
) const
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.

Author
buck

Definition at line 242 of file CameraParam.cpp.

unsigned int CameraParam::GetHeight ( ) const

get camera image height.

Author
buck

Definition at line 201 of file CameraParam.cpp.

Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrX ( ) const
inline

Definition at line 238 of file CameraParam.hh.

Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().

std::vector<double> BIAS::CameraParam::GetIlluCorrY ( ) const
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

Author
buck

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

Author
buck

Definition at line 197 of file CameraParam.cpp.

Referenced by BIAS::UnVignette::Init(), and BIAS::UnVignette::UnVignette().

double BIAS::CameraParam::GetRadius ( ) const
inline

Definition at line 182 of file CameraParam.hh.

unsigned int CameraParam::GetWidth ( ) const

get camera image width.

Author
buck

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.

Author
buck

Definition at line 230 of file CameraParam.cpp.

void BIAS::CameraParam::GetZoomUndistortion ( std::vector< CPDiscreteParam > &  vp) const
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.

double CameraParam::InterpolateAbsZoom_ ( )
protected

Definition at line 523 of file CameraParam.cpp.

double CameraParam::InterpolateFocalLength_ ( )
protected

Definition at line 483 of file CameraParam.cpp.

bool BIAS::CameraParam::IsPerspective ( ) const
inline

Definition at line 230 of file CameraParam.hh.

bool BIAS::CameraParam::IsSpherical ( ) const
inline

Definition at line 228 of file CameraParam.hh.

bool CameraParam::IsZoomCamera ( ) const

True, if camera has a zoom lens.

Author
streckel 06/2004

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.

Parameters
myXMLpoints to the XML-Tree
cameraDataNodepoints to a "CameraData"-node to append the "Camera"-node
Author
streckel 06/2004 Read a camera data parameter file and store the data in (*this)
Parameters
FilenameName of the XML-camera-data-file, document tag has to be "Camera"
Author
streckel 06/2004
Examples:
ExampleCameraParam.cpp.

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

Returns
0 on success
Author
koeser 07/2005

Definition at line 453 of file CameraParam.cpp.

References BIAS::ProjectionParametersIO::ReadFromEXIF().

void BIAS::CameraParam::SetCameraData ( const CameraData cd)
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

Author
streckel

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.

Parameters
myXMLpoints to the XML-Tree
rigNodepoints to a "Camera"-node to evaluate
Author
streckel 06/2004

Definition at line 476 of file CameraParam.cpp.

References BIAS::ProjectionParametersIO::SetData_EVID31_147094().

void CameraParam::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

Author
streckel

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.

Author
buck

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.

Author
streckel

Definition at line 188 of file CameraParam.cpp.

double BIAS::CameraParam::SetRadius ( double  r)
inline

Definition at line 190 of file CameraParam.hh.

void BIAS::CameraParam::SetSize ( unsigned int  w,
unsigned int  h 
)
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.

Author
streckel 06/2004

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.

Author
buck

Definition at line 259 of file CameraParam.cpp.

void CameraParam::SetZoomCamera ( const bool  zoomCam)

Set to 'true', if camera has a zoom lens.

Author
streckel 06/2004

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 )

Parameters
FilenameName of the XML-camera-data-file, document tag will be to be "Camera"
Author
streckel 06/2004
Examples:
ExampleCameraParam.cpp.

Definition at line 302 of file CameraParam.cpp.

References BIAS::ProjectionParametersIO::WriteCameraData().

Member Data Documentation

CameraData BIAS::CameraParam::cd_
protected

Definition at line 293 of file CameraParam.hh.

double BIAS::CameraParam::downsamplingFactor_
protected

Definition at line 296 of file CameraParam.hh.

Referenced by Init().

double BIAS::CameraParam::focallengthZoom_
protected

Definition at line 303 of file CameraParam.hh.

double BIAS::CameraParam::zoom_
protected

Definition at line 302 of file CameraParam.hh.


The documentation for this class was generated from the following files: