NDEVR
API Documentation
InMemoryRegionsProvider

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.

Detailed Description

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.

Member Function Documentation

◆ add()

void InMemoryRegionsProvider::add ( openMVG::IndexT view_id,
std::unique_ptr< openMVG::features::Regions > regions )
inline

Store regions for a view.


Parameters
view_idThe openMVG view index (must match SfM_Data::views key).
regionsOwnership-transferred regions from Image_describer::Describe().

Definition at line 52 of file InMemoryRegionsProvider.h.

◆ get()

std::shared_ptr< openMVG::features::Regions > InMemoryRegionsProvider::get ( const openMVG::IndexT x) const
inlineoverride

Return the regions for a given view.


Returns nullptr if the view is not present.

Definition at line 69 of file InMemoryRegionsProvider.h.

◆ viewCount()

uint04 InMemoryRegionsProvider::viewCount ( ) const
inline

Return the number of views stored.

Returns
The number of view IDs with associated regions.

Definition at line 77 of file InMemoryRegionsProvider.h.


The documentation for this class was generated from the following file: