SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PinholeFaugerasCamera.hpp
Go to the documentation of this file.
1 /*
2  * Copyright(c):
3  * Signal Image and Communications (SIC) Department
4  * http://www.sic.sp2mi.univ-poitiers.fr/
5  * - University of Poitiers, France http://www.univ-poitiers.fr
6  * - XLIM Institute UMR CNRS 7252 http://www.xlim.fr/
7  *
8  * and
9  *
10  * D2 Fluid, Thermic and Combustion
11  * - University of Poitiers, France http://www.univ-poitiers.fr
12  * - PPRIME Institute - UPR CNRS 3346 http://www.pprime.fr
13  * - ISAE-ENSMA http://www.ensma.fr
14  *
15  * Contributor(s):
16  * The SLIP team,
17  * Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>,
18  * Laurent David <laurent.david_AT_lea.univ-poitiers.fr>,
19  * Ludovic Chatellier <ludovic.chatellier_AT_univ-poitiers.fr>,
20  * Lionel Thomas <lionel.thomas_AT_univ-poitiers.fr>,
21  * Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>,
22  * Julien Dombre <julien.dombre_AT_univ-poitiers.fr>.
23  *
24  * Description:
25  * The Simple Library of Image Processing (SLIP) is a new image processing
26  * library. It is written in the C++ language following as much as possible
27  * the ISO/ANSI C++ standard. It is consequently compatible with any system
28  * satisfying the ANSI C++ complience. It works on different Unix , Linux ,
29  * Mircrosoft Windows and Mac OS X plateforms. SLIP is a research library that
30  * was created by the Signal, Image and Communications (SIC) departement of
31  * the XLIM, UMR 7252 CNRS Institute in collaboration with the Fluids, Thermic
32  * and Combustion departement of the P', UPR 3346 CNRS Institute of the
33  * University of Poitiers.
34  *
35  * The SLIP Library source code has been registered to the APP (French Agency
36  * for the Protection of Programs) by the University of Poitiers and CNRS,
37  * under registration number IDDN.FR.001.300034.000.S.P.2010.000.21000.
38 
39  * http://www.sic.sp2mi.univ-poitiers.fr/slip/
40  *
41  * This software is governed by the CeCILL-C license under French law and
42  * abiding by the rules of distribution of free software. You can use,
43  * modify and/ or redistribute the software under the terms of the CeCILL-C
44  * license as circulated by CEA, CNRS and INRIA at the following URL
45  * http://www.cecill.info.
46  * As a counterpart to the access to the source code and rights to copy,
47  * modify and redistribute granted by the license, users are provided only
48  * with a limited warranty and the software's author, the holder of the
49  * economic rights, and the successive licensors have only limited
50  * liability.
51  *
52  * In this respect, the user's attention is drawn to the risks associated
53  * with loading, using, modifying and/or developing or reproducing the
54  * software by the user in light of its specific status of free software,
55  * that may mean that it is complicated to manipulate, and that also
56  * therefore means that it is reserved for developers and experienced
57  * professionals having in-depth computer knowledge. Users are therefore
58  * encouraged to load and test the software's suitability as regards their
59  * requirements in conditions enabling the security of their systems and/or
60  * data to be ensured and, more generally, to use and operate it in the
61  * same conditions as regards security.
62  *
63  * The fact that you are presently reading this means that you have had
64  * knowledge of the CeCILL-C license and that you accept its terms.
65  */
66 
67 
68 
76 #ifndef SLIP_PINHOLEFAUGERASCAMERA_HPP
77 #define SLIP_PINHOLEFAUGERASCAMERA_HPP
78 
79 #include <iostream>
80 #include <cassert>
81 #include "Point2d.hpp"
82 #include "Point3d.hpp"
83 #include "Matrix.hpp"
84 #include "io_tools.hpp"
85 #include "linear_algebra.hpp"
86 
87 #include "CameraModel.hpp"
88 #include "camera_algo.hpp"
89 #include "PinholeCamera.hpp"
90 
91 #include <boost/serialization/access.hpp>
92 #include <boost/serialization/split_member.hpp>
93 #include <boost/serialization/version.hpp>
94 #include <boost/serialization/base_object.hpp>
95 
96 namespace slip
97 {
98  template <typename Type>
100 
101  template <typename Type>
102  std::ostream& operator<<(std::ostream & out, const PinholeFaugerasCamera<Type>& c);
103 
115  template <typename Type>
116  class PinholeFaugerasCamera: public PinholeCamera<Type>
117  {
118  typedef PinholeFaugerasCamera<Type> self;
119  typedef PinholeCamera<Type> base;
120  public:
125 
131  {
132  }
133 
138  PinholeFaugerasCamera(const self& rhs):base(rhs)
139  {}
140 
153  self& operator=(const self & rhs)
154  {
155  if(this != &rhs)
156  {
157  this->base::operator=(rhs);
158 
159  }
160  return *this;
161  }
184  void compute(const slip::Matrix<Type>& P)
185  {
187  }
190  private:
192  template<class Archive>
193  void save(Archive & ar, const unsigned int version) const
194  {
195  ar & boost::serialization::base_object<slip::PinholeCamera<Type> >(*this);
196  }
197  template<class Archive>
198  void load(Archive & ar, const unsigned int version)
199  {
200  ar & boost::serialization::base_object<slip::PinholeCamera<Type> >(*this);
201  }
202  BOOST_SERIALIZATION_SPLIT_MEMBER()
203 
204  };
205 
206 }//slip::
207 
208 namespace slip
209 {
210  template<typename Type>
211  std::ostream& operator<<(std::ostream & out, const slip::PinholeFaugerasCamera<Type>& c)
212  {
213  out<<*c.calibration_matrix_<<std::endl;
214  return out;
215  }
216 }//slip::
217 
218 #endif //SLIP_PINHOLEFAUGERASCAMERA_HPP
PinholeFaugerasCamera()
Default constructor of PinholeFaugerasCamera.
friend class boost::serialization::access
Provides a class to modelize 3d points.
Define a PinholeCamera class.
void compute(const slip::Matrix< Type > &P)
Computes the parameters of the pinhole camera model.
Provides a camera algorithms.
Define a PinholeFaugerasCamera class.
Provides a Pinhole camera model class.
Provides common linear algebra algorithms.
self & operator=(const self &rhs)
Assign a PinholeFaugerasCamera.
Provides an abstract class to model cameras.
PinholeFaugerasCamera(const self &rhs)
Constructs a copy of the PinholeFaugerasCamera rhs.
Provides some input/ouput algorithms.
slip::Matrix< Type > * calibration_matrix_
void getpars_Faugeras(const slip::Matrix< Type > &P, slip::Matrix< Type > &Mat)
Get calibration parameters using the Faugeras-Algorithm.
Provides a class to manipulate Numerical Matrix.
Provides a class to modelize 2d points.
self & operator=(const self &rhs)
Assign a PinholeCamera.
Define an abstract CameraModel class.
Definition: CameraModel.hpp:93