MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
bundler_intrinsics.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, Simon Fuhrmann
3 * TU Darmstadt - Graphics, Capture and Massively Parallel Computing
4 * All rights reserved.
5 *
6 * This software may be modified and distributed under the terms
7 * of the BSD 3-Clause license. See the LICENSE.txt file for details.
8 */
9
10#ifndef SFM_BUNDLER_INTRINSICS_HEADER
11#define SFM_BUNDLER_INTRINSICS_HEADER
12
13#include <string>
14#include <map>
15
16#include "mve/scene.h"
17#include "sfm/bundler_common.h"
18#include "sfm/defines.h"
19
22
28{
29public:
31 enum Source
32 {
34 FROM_VIEWS
35 };
36
37 struct Options
38 {
39 Options (void);
40
43
45 std::string exif_embedding;
46 };
47
48public:
49 explicit Intrinsics (Options const& options);
50
52 void compute (mve::Scene::Ptr scene, ViewportList* viewports);
53
54private:
55 void init_from_exif (mve::View::Ptr view, Viewport* viewport);
56 void init_from_views (mve::View::Ptr view, Viewport* viewport);
57 void fallback_focal_length (Viewport* viewport);
58
59private:
60 Options opts;
61 std::map<std::string, int> unknown_cameras;
62};
63
64/* ------------------------ Implementation ------------------------ */
65
66inline
67Intrinsics::Options::Options (void)
68 : intrinsics_source(FROM_EXIF)
69 , exif_embedding("exif")
70{
71}
72
73inline
75 : opts(options)
76{
77}
78
81
82#endif /* SFM_BUNDLER_INTRINSICS_HEADER */
std::shared_ptr< Scene > Ptr
Definition scene.h:37
std::shared_ptr< View > Ptr
Definition view.h:68
Bundler Component: Obtains initial intrinsic paramters for the viewports from either the EXIF embeddi...
Source
Data source for camera intrinsic estimates.
Intrinsics(Options const &options)
std::vector< Viewport > ViewportList
The list of all viewports considered for bundling.
#define SFM_BUNDLER_NAMESPACE_END
Definition defines.h:17
#define SFM_BUNDLER_NAMESPACE_BEGIN
Definition defines.h:16
#define SFM_NAMESPACE_END
Definition defines.h:14
#define SFM_NAMESPACE_BEGIN
Definition defines.h:13
Source intrinsics_source
Data source for camera intrinsic estimates.
std::string exif_embedding
The embedding name in which EXIF tags are stored.
Per-viewport information.