mapperpyramid.hpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. #ifndef MAPPERPYRAMID_H_
  38. #define MAPPERPYRAMID_H_
  39. #include "mapper.hpp"
  40. namespace cv {
  41. namespace reg {
  42. //! @addtogroup reg
  43. //! @{
  44. /*!
  45. * Calculates a map using a gaussian pyramid
  46. */
  47. class CV_EXPORTS MapperPyramid: public Mapper
  48. {
  49. public:
  50. /*
  51. * Constructor
  52. * \param[in] baseMapper Base mapper used for the refinements
  53. */
  54. MapperPyramid(const Mapper& baseMapper);
  55. void calculate(const cv::Mat& img1, const cv::Mat& img2, cv::Ptr<Map>& res) const;
  56. cv::Ptr<Map> getMap(void) const;
  57. unsigned numLev_; /*!< Number of levels of the pyramid */
  58. unsigned numIterPerScale_; /*!< Number of iterations at a given scale of the pyramid */
  59. private:
  60. MapperPyramid& operator=(const MapperPyramid&);
  61. const Mapper& baseMapper_; /*!< Mapper used in inner level */
  62. };
  63. //! @}
  64. }} // namespace cv::reg
  65. #endif // MAPPERPYRAMID_H_