Points&Forces (core)
Software tools facilitating the task of surveying architecture
a_intern.cxx
Go to the documentation of this file.
1 /*
2 Copyright 2000-2019 Pierre SMARS (smars@yuntech.edu.tw)
3 This program is free software: you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation, either version 2 of the License, or
6 (at your option) any later version.
7 
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 #include "a_intern.h"
17 #include <sstream>
18 //---------------------------------------------------------------------------
19 const std::string a_intern::help()
20 {
21  std::ostringstream o;
22  o << "*********" << std::endl;
23  o << "a_intern" << std::endl;
24  o << "*********" << std::endl;
25  o << "This is an internal camera calibration class" << std::endl;
26  o << "It can be used to map a 3D point to a 2D projection" << std::endl;
27  o << "3x3 matrix of the form:" << std::endl;
28  o << "----------------------:" << std::endl;
29  o << "[sx stheta u0]" << std::endl;
30  o << "[0 sy v0]" << std::endl;
31  o << "[0 0 1 ]" << std::endl;
32  o << "Commands:" << std::endl;
33  o << "--------" << std::endl;
34  o << "sx: set or get the focal for x coordinates (in image unit)" << std::endl;
35  o << "sy: set or get the focal for y coordinates (in image unit)" << std::endl;
36  o << "s: set or get the (unique) focal (in image unit)" << std::endl;
37  o << " sx = sy in a perfect pinhole camera" << std::endl;
38  o << " sx != sy if the sensor pixels are not straight" << std::endl;
39  o << "stheta: set or the skew parameter(0 in a perfect camera)" << std::endl;
40  o << " 0 for normal camera" << std::endl;
41  o << "u0: set or get the x coordinate of the principal point (in image unit)" << std::endl;
42  o << "v0: set or get the y coordinate of the principal point (in image unit)" << std::endl;
43  return o.str();
44 }
45 //---------------------------------------------------------------------------
46 a_intern::a_intern(const a_mat& m) : a_mat(3,3)
47 {
48  for (int i = 0; i<3; i++)
49  {
50  for (int j = 0; j<3; j++)
51  (*this)(i,j)= m(i,j);
52  }
53 }
a_intern()
Definition: a_intern.h:31
static const std::string help()
Definition: a_intern.cxx:19
Definition: a_mat.h:42