AliceVision
Photogrammetric Computer Vision Framework
coordinatesMap.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 <aliceVision/image/Image.hpp>
10 #include <aliceVision/camera/camera.hpp>
11 
12 #include "boundingBox.hpp"
13 
14 namespace aliceVision {
15 
17 {
18  public:
25  bool build(const std::pair<int, int>& panoramaSize,
26  const geometry::Pose3& pose,
27  const aliceVision::camera::IntrinsicBase& intrinsics,
28  const BoundingBox& coarseBbox);
29 
30  bool computeScale(double& result, float ratioUpscale);
31 
32  size_t getOffsetX() const { return _offset_x; }
33 
34  size_t getOffsetY() const { return _offset_y; }
35 
36  BoundingBox getBoundingBox() const { return _boundingBox; }
37 
38  const aliceVision::image::Image<Eigen::Vector2f>& getCoordinates() const { return _coordinates; }
39 
40  const aliceVision::image::Image<unsigned char>& getMask() const { return _mask; }
41 
42  private:
43  size_t _offset_x = 0;
44  size_t _offset_y = 0;
45 
48  BoundingBox _boundingBox;
49 };
50 
51 } // namespace aliceVision
aliceVision::BoundingBox
Definition: boundingBox.hpp:17
aliceVision::CoordinatesMap::build
bool build(const std::pair< int, int > &panoramaSize, const geometry::Pose3 &pose, const aliceVision::camera::IntrinsicBase &intrinsics, const BoundingBox &coarseBbox)
Definition: coordinatesMap.cpp:13
aliceVision
Definition: checkerDetector.cpp:32
aliceVision::image::Image< Eigen::Vector2f >
aliceVision::CoordinatesMap
Definition: coordinatesMap.hpp:16
aliceVision::camera::IntrinsicBase
Basis class for all intrinsic parameters of a camera.
Definition: IntrinsicBase.hpp:27
aliceVision::geometry::Pose3
Definition: Pose3.hpp:18