![]() |
NDEVR
API Documentation
|
An in-memory implementation of openMVG::sfm::Regions_Provider. More...
Public Member Functions | |
| void | add (openMVG::IndexT view_id, std::unique_ptr< openMVG::features::Regions > regions) |
| Store regions for a view. | |
| std::shared_ptr< openMVG::features::Regions > | get (const openMVG::IndexT x) const override |
| Return the regions for a given view. | |
| uint04 | viewCount () const |
| Return the number of views stored. | |
An in-memory implementation of openMVG::sfm::Regions_Provider.
OpenMVG's default Regions_Provider loads feature regions from disk (.feat / .desc files). This subclass instead holds regions directly from the image describer output, completely eliminating disk I/O from the feature-extraction-to-matching handoff.
The SfM engine and all matcher classes accept a shared_ptr<Regions_Provider>, so dropping an InMemoryRegionsProvider in place of the default one requires no other changes to the OpenMVG pipeline.
Usage: auto provider = std::make_shared<InMemoryRegionsProvider>(); for each image i: auto regions = describer->Describe(image); provider->add(i, std::move(regions)); pass provider to matcher and SfM engine
Definition at line 41 of file InMemoryRegionsProvider.h.
|
inline |
Store regions for a view.
| view_id | The openMVG view index (must match SfM_Data::views key). |
| regions | Ownership-transferred regions from Image_describer::Describe(). |
Definition at line 52 of file InMemoryRegionsProvider.h.
|
inlineoverride |
Return the regions for a given view.
Returns nullptr if the view is not present.
Definition at line 69 of file InMemoryRegionsProvider.h.
|
inline |
Return the number of views stored.
Definition at line 77 of file InMemoryRegionsProvider.h.