AliceVision
Photogrammetric Computer Vision Framework
Public Member Functions | List of all members
aliceVision::feature::ImageDescriber_Roma Class Reference

Create an ImageDescriber interface for Roma deep dense feature extractor. More...

#include <ImageDescriber_Roma.hpp>

Inheritance diagram for aliceVision::feature::ImageDescriber_Roma:
aliceVision::feature::ImageDescriber

Public Member Functions

bool useCuda () const override
 Check if the image describer uses CUDA. More...
 
bool useFloatImage () const override
 Check if the image describer uses a float image. More...
 
EImageDescriberType getDescriberType () const override
 Get the corresponding EImageDescriberType. More...
 
std::size_t getMemoryConsumption (std::size_t width, std::size_t height) const override
 Get the total amount of RAM needed for a feature extraction of an image of the given dimension. More...
 
void setConfigurationPreset (ConfigurationPreset preset) override
 Use a preset to control the number of detected regions. More...
 
bool describe (const image::Image< unsigned char > &image, std::unique_ptr< Regions > &regions, const image::Image< unsigned char > *mask=nullptr) override
 Detect regions on the 8-bit image and compute their attributes. More...
 
void allocate (std::unique_ptr< Regions > &regions) const override
 Allocate Regions type for Roma. More...
 
- Public Member Functions inherited from aliceVision::feature::ImageDescriber
virtual void setUpRight ([[maybe_unused]] bool upRight)
 Set whether the image describer is always upright. More...
 
virtual void setUseCuda ([[maybe_unused]] bool useCuda)
 Set whether the image describer needs to use CUDA implementation. More...
 
virtual void setCudaPipe ([[maybe_unused]] int pipe)
 Set the CUDA pipe. More...
 
virtual bool describe ([[maybe_unused]] const image::Image< unsigned char > &image, [[maybe_unused]] std::unique_ptr< Regions > &regions, [[maybe_unused]] const image::Image< unsigned char > *mask=nullptr)
 Detect regions on the 8-bit image and compute their attributes (description) More...
 
virtual bool describe ([[maybe_unused]] const image::Image< float > &image, [[maybe_unused]] std::unique_ptr< Regions > &regions, [[maybe_unused]] const image::Image< unsigned char > *mask=nullptr)
 Detect regions on the float image and compute their attributes (description) More...
 
void Load (Regions *regions, const std::string &sfileNameFeats, const std::string &sfileNameDescs) const
 
void Save (const Regions *regions, const std::string &sfileNameFeats, const std::string &sfileNameDescs) const
 
void LoadFeatures (Regions *regions, const std::string &sfileNameFeats) const
 

Detailed Description

Create an ImageDescriber interface for Roma deep dense feature extractor.

This is a "virtual" describer: it does not perform extraction itself but provides the AliceVision interface to load/save pre-computed Roma regions. Actual feature extraction is expected to be performed externally (e.g. via a dedicated Python pipeline) and the resulting .feat/.desc files consumed through this describer.

Member Function Documentation

◆ allocate()

void aliceVision::feature::ImageDescriber_Roma::allocate ( std::unique_ptr< Regions > &  regions) const
overridevirtual

Allocate Regions type for Roma.

Parameters
[in,out]regions

Implements aliceVision::feature::ImageDescriber.

◆ describe()

bool aliceVision::feature::ImageDescriber_Roma::describe ( const image::Image< unsigned char > &  image,
std::unique_ptr< Regions > &  regions,
const image::Image< unsigned char > *  mask = nullptr 
)
override

Detect regions on the 8-bit image and compute their attributes.

For this virtual describer the function is a no-op stub: Roma features are expected to be pre-computed externally. Calling this will throw.

Parameters
[in]imageInput 8-bit grayscale image (unused)
[out]regionsOutput regions (unused)
[in]maskOptional keypoint mask (unused)
Returns
False – not implemented

◆ getDescriberType()

EImageDescriberType aliceVision::feature::ImageDescriber_Roma::getDescriberType ( ) const
inlineoverridevirtual

Get the corresponding EImageDescriberType.

Returns
EImageDescriberType::ROMA

Implements aliceVision::feature::ImageDescriber.

◆ getMemoryConsumption()

std::size_t aliceVision::feature::ImageDescriber_Roma::getMemoryConsumption ( std::size_t  width,
std::size_t  height 
) const
inlineoverridevirtual

Get the total amount of RAM needed for a feature extraction of an image of the given dimension.

Parameters
[in]widthThe image width
[in]heightThe image height
Returns
total amount of memory needed (conservative upper bound)

Implements aliceVision::feature::ImageDescriber.

◆ setConfigurationPreset()

void aliceVision::feature::ImageDescriber_Roma::setConfigurationPreset ( ConfigurationPreset  preset)
overridevirtual

Use a preset to control the number of detected regions.

Parameters
[in]presetThe preset configuration

Implements aliceVision::feature::ImageDescriber.

◆ useCuda()

bool aliceVision::feature::ImageDescriber_Roma::useCuda ( ) const
inlineoverridevirtual

Check if the image describer uses CUDA.

Returns
False – extraction is performed externally

Implements aliceVision::feature::ImageDescriber.

◆ useFloatImage()

bool aliceVision::feature::ImageDescriber_Roma::useFloatImage ( ) const
inlineoverridevirtual

Check if the image describer uses a float image.

Returns
False – extraction is performed externally

Implements aliceVision::feature::ImageDescriber.


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