OpenCV 4.5.3(日本語機械翻訳)
mapperpyramid.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 MAPPERPYRAMID_H_
39 #define MAPPERPYRAMID_H_
40
41 #include "mapper.hpp"
42 #include "mapaffine.hpp"
43 #include "mapprojec.hpp"
44 #include "mapshift.hpp"
45
46 namespace cv {
47 namespace reg {
48
51
55 class CV_EXPORTS_W MapperPyramid: public Mapper
56{
57 public:
58 /*
59 * Constructor
60 * \param[in] baseMapper Base mapper used for the refinements
61 */
62 CV_WRAP MapperPyramid(Ptr<Mapper> baseMapper);
63
64 CV_WRAP virtual cv::Ptr<Map> calculate(InputArray img1, InputArray img2, cv::Ptr<Map> init = cv::Ptr<Map>()) const CV_OVERRIDE;
65
66 CV_WRAP cv::Ptr<Map> getMap() const CV_OVERRIDE;
67
68 CV_PROP_RW int numLev_;
69 CV_PROP_RW int numIterPerScale_;
71 private:
72 MapperPyramid& operator=(const MapperPyramid&);
73 const Mapper& baseMapper_;
74};
75
79 class CV_EXPORTS_W MapTypeCaster
80{
81 public:
82 CV_WRAP static Ptr<MapAffine> toAffine(Ptr<Map> sourceMap)
83 {
84 MapAffine& affineMap = dynamic_cast< MapAffine&>(*sourceMap);
85 return Ptr<MapAffine>(new MapAffine(affineMap));
86 }
87
88 CV_WRAP static Ptr<MapShift> toShift(Ptr<Map> sourceMap)
89 {
90 MapShift& shiftMap = dynamic_cast< MapShift&>(*sourceMap);
91 return Ptr<MapShift>(new MapShift(shiftMap));
92 }
93
94 CV_WRAP static Ptr<MapProjec> toProjec(Ptr<Map> sourceMap)
95 {
96 MapProjec& projecMap = dynamic_cast< MapProjec&>(*sourceMap);
97 return Ptr<MapProjec>(new MapProjec(projecMap));
98 }
99};
100
102
103}} // namespace cv::reg
104
105 #endif // MAPPERPYRAMID_H_
Definition: mapaffine.hpp:53
Definition: mapprojec.hpp:54
Definition: mapshift.hpp:54
Definition: mapperpyramid.hpp:80
Base class for modelling an algorithm for calculating a map
Definition: mapper.hpp:55
Definition: mapperpyramid.hpp:56
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74