NDEVR
API Documentation
PhotogrammetryFeatures.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2026, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: DronePhotogrammetry
28File: PhotogrammetryFeatures
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include "PhotogrammetryOptions.h"
35#include <NDEVR/BaseValues.h>
36#include <NDEVR/Buffer.h>
37#include <NDEVR/File.h>
38#include <NDEVR/Log.h>
39#include <NDEVR/Vertex.h>
40
41#include <array>
42#include <functional>
43#include <memory>
44#include <unordered_map>
45
46// OpenMVG forward declarations
47namespace openMVG { namespace sfm { struct SfM_Data; } }
48
49namespace NDEVR
50{
53
58 {
59 std::shared_ptr<InMemoryRegionsProvider> regions_provider;
60 std::unordered_map<uint32_t, std::array<double, 3>> gps_lla;
61 };
62
67 class DRONE_PHOTOGRAMMETRY_API PhotogrammetryFeatures
68 {
69 public:
70 using ProgressFn = std::function<void(fltp04)>;
71
77 {
78 switch (quality)
79 {
80 case PhotogrammetryQuality::e_high: return 20;
81 case PhotogrammetryQuality::e_normal: return 15;
82 default: return 10;
83 }
84 }
85
89 const Buffer<File>& original_images,
90 const Buffer<File>& working_images,
91 const Buffer<Vector<2, uint04>>& working_sizes,
92 openMVG::sfm::SfM_Data& sfm_data,
93 const PhotogrammetryOptions& options,
94 LogPtr log,
95 ProgressFn progress_fn,
96 const bool& cancel_flag);
97
99 static std::shared_ptr<InMemoryMatchesProvider> matchFeatures(
100 const std::shared_ptr<InMemoryRegionsProvider>& regions,
101 const std::unordered_map<uint32_t, std::array<double, 3>>& gps_lla,
102 const openMVG::sfm::SfM_Data& sfm_data,
103 const PhotogrammetryOptions& options,
104 LogPtr log,
105 ProgressFn progress_fn);
106 };
107}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
An in-memory implementation of openMVG::sfm::Matches_Provider.
An in-memory implementation of openMVG::sfm::Regions_Provider.
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
Handles feature extraction (SIFT/AKAZE) and feature matching (cascade hashing / brute force).
static FeatureExtractionResult extractFeatures(const Buffer< File > &original_images, const Buffer< File > &working_images, const Buffer< Vector< 2, uint04 > > &working_sizes, openMVG::sfm::SfM_Data &sfm_data, const PhotogrammetryOptions &options, LogPtr log, ProgressFn progress_fn, const bool &cancel_flag)
Extract SIFT/AKAZE features from images, parse EXIF GPS, populate sfm_data views.
static std::shared_ptr< InMemoryMatchesProvider > matchFeatures(const std::shared_ptr< InMemoryRegionsProvider > &regions, const std::unordered_map< uint32_t, std::array< double, 3 > > &gps_lla, const openMVG::sfm::SfM_Data &sfm_data, const PhotogrammetryOptions &options, LogPtr log, ProgressFn progress_fn)
Build pair graph (GPS k-NN or exhaustive) and run feature matching.
static uint04 gpsNeighborK(PhotogrammetryQuality quality)
Number of GPS-nearest neighbours to match per image when a GPS position graph is used.
Persistent settings for a drone photogrammetry processing run.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
PhotogrammetryQuality
Controls which feature extractor and matching strategy OpenMVG uses.
@ e_high
Quality: SIFT features, vocabulary-tree matching, full-resolution MVS.
@ e_normal
Balanced: SIFT features, cascade hash matching, full-resolution MVS.
Output from feature extraction, consumed by matching and SfM stages.