ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim > Class Template Reference

#include <visual_index.h>

Classes

struct  BuildOptions
 
struct  IndexOptions
 
struct  QueryOptions
 

Public Types

typedef InvertedIndex< kDescType, kDescDim, kEmbeddingDim > InvertedIndexType
 
typedef FeatureKeypoints GeomType
 
typedef InvertedIndexType::DescType DescType
 
typedef InvertedIndexType::EntryType EntryType
 

Public Member Functions

 VisualIndex ()
 
 ~VisualIndex ()
 
size_t NumVisualWords () const
 
void Add (const IndexOptions &options, const int image_id, const GeomType &geometries, const DescType &descriptors)
 
bool ImageIndexed (const int image_id) const
 
void Query (const QueryOptions &options, const DescType &descriptors, std::vector< ImageScore > *image_scores) const
 
void Query (const QueryOptions &options, const GeomType &geometries, const DescType &descriptors, std::vector< ImageScore > *image_scores) const
 
void Prepare ()
 
void Build (const BuildOptions &options, const DescType &descriptors)
 
void Read (const std::string &path)
 
void Write (const std::string &path)
 

Static Public Attributes

static const int kMaxNumThreads = -1
 

Detailed Description

template<typename kDescType = uint8_t, int kDescDim = 128, int kEmbeddingDim = 64>
class colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >

Definition at line 37 of file visual_index.h.

Member Typedef Documentation

◆ DescType

template<typename kDescType = uint8_t, int kDescDim = 128, int kEmbeddingDim = 64>
typedef InvertedIndexType::DescType colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::DescType

Definition at line 42 of file visual_index.h.

◆ EntryType

template<typename kDescType = uint8_t, int kDescDim = 128, int kEmbeddingDim = 64>
typedef InvertedIndexType::EntryType colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::EntryType

Definition at line 43 of file visual_index.h.

◆ GeomType

template<typename kDescType = uint8_t, int kDescDim = 128, int kEmbeddingDim = 64>
typedef FeatureKeypoints colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::GeomType

Definition at line 41 of file visual_index.h.

◆ InvertedIndexType

template<typename kDescType = uint8_t, int kDescDim = 128, int kEmbeddingDim = 64>
typedef InvertedIndex<kDescType, kDescDim, kEmbeddingDim> colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::InvertedIndexType

Definition at line 40 of file visual_index.h.

Constructor & Destructor Documentation

◆ VisualIndex()

template<typename kDescType , int kDescDim, int kEmbeddingDim>
colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::VisualIndex

Definition at line 171 of file visual_index.h.

◆ ~VisualIndex()

template<typename kDescType , int kDescDim, int kEmbeddingDim>
colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::~VisualIndex

Definition at line 175 of file visual_index.h.

Member Function Documentation

◆ Add()

◆ Build()

◆ ImageIndexed()

template<typename kDescType , int kDescDim, int kEmbeddingDim>
bool colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::ImageIndexed ( const int  image_id) const

Definition at line 231 of file visual_index.h.

Referenced by colmap::RunVocabTreeRetriever().

◆ NumVisualWords()

template<typename kDescType , int kDescDim, int kEmbeddingDim>
size_t colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::NumVisualWords

Definition at line 182 of file visual_index.h.

Referenced by colmap::RunVocabTreeBuilder().

◆ Prepare()

template<typename kDescType , int kDescDim, int kEmbeddingDim>
void colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::Prepare

Definition at line 509 of file visual_index.h.

Referenced by colmap::RunVocabTreeRetriever().

◆ Query() [1/2]

template<typename kDescType , int kDescDim, int kEmbeddingDim>
void colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::Query ( const QueryOptions options,
const DescType descriptors,
std::vector< ImageScore > *  image_scores 
) const

Definition at line 237 of file visual_index.h.

References descriptors.

Referenced by colmap::RunVocabTreeRetriever().

◆ Query() [2/2]

◆ Read()

template<typename kDescType , int kDescDim, int kEmbeddingDim>
void colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::Read ( const std::string &  path)

Definition at line 544 of file visual_index.h.

References cloudViewer::t::geometry::path, and SEEK_SET.

Referenced by colmap::RunVocabTreeRetriever().

◆ Write()

template<typename kDescType , int kDescDim, int kEmbeddingDim>
void colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::Write ( const std::string &  path)

Member Data Documentation

◆ kMaxNumThreads

template<typename kDescType = uint8_t, int kDescDim = 128, int kEmbeddingDim = 64>
const int colmap::retrieval::VisualIndex< kDescType, kDescDim, kEmbeddingDim >::kMaxNumThreads = -1
static

Definition at line 39 of file visual_index.h.


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