ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
camera_database.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <string>
11 
12 #include "util/camera_specs.h"
13 
14 namespace colmap {
15 
16 // Database that contains sensor widths for many cameras, which is useful
17 // to automatically extract the focal length if EXIF information is incomplete.
19 public:
21 
22  size_t NumEntries() const { return specs_.size(); }
23 
24  bool QuerySensorWidth(const std::string& make,
25  const std::string& model,
26  double* sensor_width);
27 
28 private:
29  static const camera_specs_t specs_;
30 };
31 
32 } // namespace colmap
bool QuerySensorWidth(const std::string &make, const std::string &model, double *sensor_width)
size_t NumEntries() const
std::unordered_map< std::string, camera_make_specs_t > camera_specs_t
Definition: camera_specs.h:18