26 #ifndef __BIAS_ProjectionParametersIO_hh__
27 #define __BIAS_ProjectionParametersIO_hh__
28 #include "bias_config.h"
30 #include <Base/Common/BIASpragmaStart.hh>
31 #include <Base/Math/Vector3.hh>
32 #include <Base/Geometry/HomgPoint2D.hh>
34 #include <Base/Debug/Debug.hh>
36 # include <Base/Common/XMLBase.hh>
39 #include <Base/Geometry/KMatrix.hh>
41 #define CAMERA_PARAMETER_CURRENT_XML_VERSION 2.0
42 #define RIG_PARAMETER_CURRENT_XML_VERSION 1.0
46 #ifndef __BIAS_CPDiscreteParam__
47 #define __BIAS_CPDiscreteParam__
54 double kc1,kc2,kc3,
kc4;
120 double acCoeff0_,acCoeff1_,acCoeff2_,acCoeff3_,
acCoeff4_;
137 static int ReadFromBBCStream(std::ifstream& infile,
139 const double& addppx=0.0,
140 const double& addppy=0.0,
141 const bool silent =
false);
146 static int ReadFromBBC(
const std::string& filename,
148 const double& addppx=0.0,
149 const double& addppy=0.0,
150 const bool silent =
false);
155 static int ReadFromEXIF(
const std::string& filename,
160 const int w,
const int h,
163 #ifdef BIAS_HAVE_XML2
170 static int WriteRigData(
const std::string &filename,
171 const std::vector<CameraData>& vcd,
172 const std::vector<SensorData>& vsd=
179 static int WriteCameraData(
const std::string& Filename,
188 static int ReadRigData(
const std::string &filename,
189 std::vector<CameraData>& vcd,
190 const bool silent =
false);
192 static int ReadRigData(
const std::string &filename,
193 std::vector<CameraData>& vcd,
194 std::vector<SensorData>& vsd,
195 const bool silent =
false);
201 static int ReadCameraData(
const std::string& Filename,
203 const bool silent =
false);
205 #endif //BIAS_HAVE_XML2
209 static void SetData_EVID31_147094(
CameraData& cd);
210 static void SetData_OMNITECH_ORIFL_190_3(
CameraData& cd);
211 static void SetData_DummyRig(std::vector<CameraData>& vcd);
215 #ifdef BIAS_HAVE_XML2
222 static int ReadCameraData(
XMLIO &myXML, xmlNodePtr &cameraNode,
224 const bool silent =
false);
233 static int AddCameraDataToRig(
XMLIO &myXML, xmlNodePtr &cameraDataNode,
238 static int AddCameraDataToNode(
XMLIO &myXML, xmlNodePtr &rootNode,
240 #endif // BIAS_HAVE_XML2
249 static int ReadRigDataV0_8(
const std::string &filename,
250 std::vector<CameraData>& vcd,
251 const bool silent =
false);
252 #ifdef BIAS_HAVE_XML2
254 static int ReadCameraDataV1_0(
XMLIO &myXML, xmlNodePtr &cameraNode,
256 const bool silent =
false);
257 static int ReadCameraDataV0_8(
XMLIO &myXML, xmlNodePtr &cameraNode,
259 const bool silent =
false);
260 #endif // BIAS_HAVE_XML2
266 static int InitAngleCorrFromPoly_(
CameraData &cd);
275 BIASGeometry_EXPORT std::ostream& operator<<(std::ostream &os, std::vector<BIAS::CameraData>& vcd);
276 BIASGeometry_EXPORT std::ostream& operator<<(std::ostream &os, std::vector<BIAS::SensorData>& vsd);
280 #include <Base/Common/BIASpragmaEnd.hh>
std::vector< double > IlluCorrY_
std::vector< double > IlluCorrX_
std::ostream & operator<<(std::ostream &os, const AppData &ad)
std::vector< double > AngleCorrX_
BIAS::Vector3< double > PoseInRigCenter_
Wrapper class for reading and writing XML files based on the XML library libxml2. ...
std::vector< CPDiscreteParam > knownparams_vect_
BIAS::Vector3< double > PoseInRigCenter_
std::vector< double > AngleCorrY_
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).