OpenCV 4.5.3(日本語機械翻訳)
mapprojec.hpp
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
8 //
9 // Copyright (C) 2013, Alfonso Sanchez-Beato, all rights reserved.
10 // Third party copyrights are property of their respective owners.
11 //
12 // Redistribution and use in source and binary forms, with or without modification,
13 // are permitted provided that the following conditions are met:
14 //
15 // * Redistribution's of source code must retain the above copyright notice,
16 // this list of conditions and the following disclaimer.
17 //
18 // * Redistribution's in binary form must reproduce the above copyright notice,
19 // this list of conditions and the following disclaimer in the documentation
20 // and/or other materials provided with the distribution.
21 //
22 // * The name of the copyright holders may not be used to endorse or promote products
23 // derived from this software without specific prior written permission.
24 //
25 // This software is provided by the copyright holders and contributors "as is" and
26 // any express or implied warranties, including, but not limited to, the implied
27 // warranties of merchantability and fitness for a particular purpose are disclaimed.
28 // In no event shall the contributors be liable for any direct,
29 // indirect, incidental, special, exemplary, or consequential damages
30 // (including, but not limited to, procurement of substitute goods or services;
31 // loss of use, data, or profits; or business interruption) however caused
32 // and on any theory of liability, whether in contract, strict liability,
33 // or tort (including negligence or otherwise) arising in any way out of
34 // the use of this software, even if advised of the possibility of such damage.
35 //
36 //M*/
37
38 #ifndef MAPPROJEC_H_
39 #define MAPPROJEC_H_
40
41 #include "map.hpp"
42
43
44 namespace cv {
45 namespace reg {
46
49
53 class CV_EXPORTS_W MapProjec : public Map
54{
55 public:
59 CV_WRAP MapProjec();
60
65 CV_WRAP MapProjec(InputArray projTr);
66
71
72 CV_WRAP void inverseWarp(InputArray img1, OutputArray img2) const CV_OVERRIDE;
73
74 CV_WRAP cv::Ptr<Map> inverseMap() const CV_OVERRIDE;
75
76 CV_WRAP void compose(cv::Ptr<Map> map) CV_OVERRIDE;
77
78 CV_WRAP void scale(double factor) CV_OVERRIDE;
79
84 const cv::Matx<double, 3, 3>& getProjTr() const {
85 return projTr_;
86 }
87
88 CV_WRAP void getProjTr(OutputArray projTr) const {
89 Mat(projTr_).copyTo(projTr);
90 }
91
95 CV_WRAP void normalize() {
96 double z = 1./projTr_(2, 2);
97 for(size_t v_i = 0; v_i < sizeof(projTr_.val)/sizeof(projTr_.val[0]); ++v_i)
98 projTr_.val[v_i] *= z;
99 }
100
101 private:
102 cv::Matx<double, 3, 3> projTr_; /*< Projection matrix */
103};
104
106
107}} // namespace cv::reg
108
109 #endif // MAPPROJEC_H_
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition: mat.hpp:295
n-dimensional dense array class
Definition: mat.hpp:802
void copyTo(OutputArray m) const
Copies the matrix to another one.
Template class for small matrices whose type and size are known at compilation time
Definition: matx.hpp:100
Base class for modelling a Map between two images.
Definition: map.hpp:125
Definition: mapprojec.hpp:54
CV_EXPORTS_W void normalize(InputArray src, InputOutputArray dst, double alpha=1, double beta=0, int norm_type=NORM_L2, int dtype=-1, InputArray mask=noArray())
Normalizes the norm or value range of an array.
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74