24 #ifndef __BIASCAMERA_HH__
25 #define __BIASCAMERA_HH__
26 #include "bias_config.h"
28 #include <Base/Image/Image.hh>
29 #include <Geometry/PMatrix.hh>
30 #include <Geometry/Projection.hh>
31 #include <Base/Geometry/KMatrix.hh>
32 #include <Geometry/RMatrix.hh>
33 #include <Base/Math/Vector3.hh>
34 #include <Base/Image/MetaData.hh>
40 #define D_CAM_DCPTU 0x0001
41 #define D_CAM_DCINERT 0x0002
42 #define D_CAMERA_METADATA 0x0004
43 #define D_CAM_IO 0x0008
73 template <
class StorageType>
95 int ParseMetaData(
bool bUse2x64bitTS=
true);
100 int UpdateMetaData();
102 inline int SetP(
const PMatrix& matP) { PValid_=
true; P_=matP;
return 0;};
107 Proj_=Proj;
return 0;};
114 ASCIIString_=ASCIIString; ASCIIValid_=
true;
124 inline void SetTime(
unsigned long long int sec,
unsigned long long int usec)
126 TimeSec_ = sec + usec/1000000;
127 TimeUSec_ = usec%TimeSec_;
135 TimeSec_ =
static_cast<int> (sec);
136 TimeUSec_ =
static_cast<int> (rint((sec-(
double)TimeSec_)*1000000.0));
139 inline void GetTime(
unsigned long long int &sec,
unsigned long long int &usec)
147 return double(TimeSec_) + double(TimeUSec_)/1000000.0;
152 { Orientation_[0] = ori[0]; Orientation_[1] = ori[1];
153 Orientation_[2] = ori[2]; OrientationValid_=
true;};
156 Orientation_[0] = float(ori[0]); Orientation_[1] = float(ori[1]);
157 Orientation_[2] = float(ori[2]); OrientationValid_=
true;
161 o0 = Orientation_[0]; o1 = Orientation_[1]; o2 = Orientation_[2];}
164 ori[0] = Orientation_[0]; ori[1] = Orientation_[1];
165 ori[2] = Orientation_[2];}
176 inline void Setf(
const double& focal) {_f = focal; fValid_=
true;};
177 inline const double Getf()
const {
return _f; };
184 inertial = i; inertialValid_=
true; };
194 void PrintAppData(std::ostream &os) ;
251 float Orientation_[3];
bool PointValid_
is correspondig field of data valid or unknown ?
void SetTime(double sec)
set time from double (in seconds and useconds after full seconds)
void GetTime(unsigned long long int &sec, unsigned long long int &usec)
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
void SetASCIIString(const std::string &ASCIIString)
const DC_GPS & GetGPS() const
bool TimeValid_
is correspondig field of data valid or unknown ?
BIAS::UUID const GetReferenceUUID() const
bool PValid_
is correspondig field of data valid or unknown ?
extends the Image by MetaData support (e.g.
KMatrix _K
camera calibration with internals
bool RValid_
is correspondig field of data valid or unknown ?
const Vector3< double > & GetC() const
bool IsCValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
bool IsKValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
void SetOrientation(const BIAS::Vector3< double > &ori)
void GetOrientation(float &o0, float &o1, float &o2) const
void GetOrientation(BIAS::Vector3< double > &ori) const
void SetOrientation(const float ori[3])
bool gpsValid_
is correspondig field of data valid or unknown ?
Vector3< double > _C
camera center in wcs
HomgPoint2D _Point
a point, it is up to you what you put in
int SetP(const PMatrix &matP)
bool ASCIIValid_
is correspondig field of data valid or unknown ?
virtual Camera< StorageType > * Clone() const
virtual covariant copy constructor which produces the same type of object as the template object (Ima...
bool IsTimeValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
const double Getf() const
std::string ASCIIString_
ASCII multifunctional string.
This class hides the underlying projection model, like projection matrix, spherical camera...
void SetReferenceUUID(const BIAS::UUID &uid)
const DC_inertial & GetInertial() const
double _f
focal length in m
unsigned long long int TimeUSec_
time stamp in microseconds
PMatrix P_
pmatrix, maybe non-metric
int SetProj(const Projection &Proj)
void SetC(const Vector3< double > &C)
bool IsPointValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
std::string GetASCIIString()
bool fValid_
is correspondig field of data valid or unknown ?
class BIASVideoSource_EXPORT Camera
The image template class for specific storage types.
bool inertialValid_
is correspondig field of data valid or unknown ?
void SetInertial(DC_inertial &i)
const BIAS::PMatrix & GetP() const
bool IsfValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
const DC_ptu & GetPTU() const
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).
bool IsRValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
unsigned long long int TimeSec_
time stamp in seconds
bool KValid_
is correspondig field of data valid or unknown ?
void Setf(const double &focal)
bool IsOrientationValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
bool ptuValid_
is correspondig field of data valid or unknown ?
void SetTime(unsigned long long int sec, unsigned long long int usec)
Set time and ensure correct format (seconds and useconds after 'sec')
RMatrix _R
camera orientation
describes a projective 3D -> 2D mapping in homogenous coordinates
const RMatrix & GetR() const
bool CValid_
is correspondig field of data valid or unknown ?
void SetK(const KMatrix &K)
interface class for producing/storing Universally Unique IDentifiers
bool IsPValid() const
Is field of data valid or unknown ? if false, the return value of the Get...()-function is undefined...
const BIAS::Projection & GetProj() const
This is the base class for images in BIAS.
void SetR(const RMatrix &R)
bool OrientationValid_
is correspondig field of data valid or unknown ?
const KMatrix & GetK() const