AliceVision
Photogrammetric Computer Vision Framework
warper.hpp
1 // This file is part of the AliceVision project.
2 // Copyright (c) 2020 AliceVision contributors.
3 // This Source Code Form is subject to the terms of the Mozilla Public License,
4 // v. 2.0. If a copy of the MPL was not distributed with this file,
5 // You can obtain one at https://mozilla.org/MPL/2.0/.
6 
7 #pragma once
8 
9 #include "coordinatesMap.hpp"
10 #include "gaussian.hpp"
11 
12 namespace aliceVision {
13 
14 class Warper
15 {
16  public:
17  virtual bool warp(const CoordinatesMap& map, const aliceVision::image::Image<image::RGBfColor>& source);
18 
19  const aliceVision::image::Image<image::RGBfColor>& getColor() const { return _color; }
20 
21  const aliceVision::image::Image<unsigned char>& getMask() const { return _mask; }
22 
23  size_t getOffsetX() const { return _offset_x; }
24 
25  size_t getOffsetY() const { return _offset_y; }
26 
27  protected:
28  size_t _offset_x = 0;
29  size_t _offset_y = 0;
30 
33 };
34 
35 class GaussianWarper : public Warper
36 {
37  public:
38  virtual bool warp(const CoordinatesMap& map, const GaussianPyramidNoMask& pyramid, bool clamp);
39 };
40 
41 } // namespace aliceVision
aliceVision::GaussianWarper
Definition: warper.hpp:35
aliceVision::Warper
Definition: warper.hpp:14
aliceVision
Definition: checkerDetector.cpp:32
aliceVision::GaussianPyramidNoMask
Definition: gaussian.hpp:13
aliceVision::image::Image
Definition: ImageDescriber_AKAZE_OCV.hpp:21
aliceVision::GaussianWarper::warp
virtual bool warp(const CoordinatesMap &map, const GaussianPyramidNoMask &pyramid, bool clamp)
Definition: warper.cpp:55
aliceVision::clamp
T clamp(const T &val, const T &min, const T &max)
Clamp return the number if inside range, else min or max range.
Definition: numeric.hpp:140
aliceVision::CoordinatesMap
Definition: coordinatesMap.hpp:16
aliceVision::Warper::warp
virtual bool warp(const CoordinatesMap &map, const aliceVision::image::Image< image::RGBfColor > &source)
Definition: warper.cpp:14