MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
image_pyramid.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, Benjamin Richter, 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 DMRECON_IMAGE_PYRAMID_H
11#define DMRECON_IMAGE_PYRAMID_H
12
13#include <vector>
14#include <memory>
15#include <map>
16#include <mutex>
17
18#include "mve/scene.h"
19#include "mve/view.h"
20#include "mve/image_base.h"
21
22#include "mve/camera.h"
23#include "math/matrix.h"
24#include "dmrecon/defines.h"
25
27
38
39inline
40ImagePyramidLevel::ImagePyramidLevel()
41 : width(0)
42 , height(0)
43{
44}
45
46inline
48 int _width, int _height)
49 : width(_width)
50 , height(_height)
51{
54}
55
61class ImagePyramid : public std::vector<ImagePyramidLevel>
62{
63public:
64 typedef std::shared_ptr<ImagePyramid> Ptr;
65 typedef std::shared_ptr<ImagePyramid const> ConstPtr;
66};
67
69{
70public:
72 mve::View::Ptr view, std::string embeddingName, int minLevel);
73 static void cleanup();
74
75private:
76 static std::mutex metadataMutex;
77 static mve::Scene::Ptr cachedScene;
78 static std::string cachedEmbedding;
79
80 static std::map<int, ImagePyramid::Ptr> entries;
81};
82
84
85#endif
Matrix class for arbitrary dimensions and types.
Definition matrix.h:54
std::shared_ptr< Image< T > const > ConstPtr
Definition image.h:43
std::shared_ptr< Scene > Ptr
Definition scene.h:37
std::shared_ptr< View > Ptr
Definition view.h:68
static ImagePyramid::ConstPtr get(mve::Scene::Ptr scene, mve::View::Ptr view, std::string embeddingName, int minLevel)
Image pyramids are represented as vectors of pyramid levels, where the presence of an image in a spec...
std::shared_ptr< ImagePyramid > Ptr
std::shared_ptr< ImagePyramid const > ConstPtr
#define MVS_NAMESPACE_BEGIN
Definition defines.h:18
#define MVS_NAMESPACE_END
Definition defines.h:19
Per-view camera information with various helper functions.
Definition camera.h:24
void fill_calibration(float *mat, float width, float height) const
Stores the 3x3 calibration (or projection) matrix (K-matrix in Hartley, Zisserman).
Definition camera.cc:125
void fill_inverse_calibration(float *mat, float width, float height) const
Stores 3x3 inverse calibration (or inverse projection) matrix.
Definition camera.cc:180
math::Matrix3f invproj
mve::ByteImage::ConstPtr image