Swarm-SLAM  1.0.0
C-SLAM Framework
cslam.nns_matching.NearestNeighborsMatching Class Reference
Inheritance diagram for cslam.nns_matching.NearestNeighborsMatching:
[legend]

Public Member Functions

def __init__ (self, dim=None)
 
def add_item (self, vector, item)
 
def search (self, query, k)
 
def search_best (self, query)
 

Public Attributes

 n
 
 dim
 
 items
 
 data
 

Detailed Description

Nearest Neighbor matching of description vectors

Definition at line 6 of file nns_matching.py.

Constructor & Destructor Documentation

◆ __init__()

def cslam.nns_matching.NearestNeighborsMatching.__init__ (   self,
  dim = None 
)
Initialization

Args:
    dim (int, optional): Global descriptor size. Defaults to None.

Definition at line 10 of file nns_matching.py.

Member Function Documentation

◆ add_item()

def cslam.nns_matching.NearestNeighborsMatching.add_item (   self,
  vector,
  item 
)
Add item to the matching list

Args:
    vector (np.array): descriptor
    item: identification info (e.g., int)

Definition at line 23 of file nns_matching.py.

◆ search()

def cslam.nns_matching.NearestNeighborsMatching.search (   self,
  query,
  k 
)
Search for nearest neighbors

Args:
    query (np.array): descriptor to match
    k (int): number of best matches to return

Returns:
    list(int, np.array): best matches

Definition at line 42 of file nns_matching.py.

Here is the caller graph for this function:

◆ search_best()

def cslam.nns_matching.NearestNeighborsMatching.search_best (   self,
  query 
)
Search for the nearest neighbor

Args:
    query (np.array): descriptor to match

Returns:
    int, np.array: best match

Definition at line 63 of file nns_matching.py.

Here is the call graph for this function:

Member Data Documentation

◆ data

cslam.nns_matching.NearestNeighborsMatching.data

Definition at line 19 of file nns_matching.py.

◆ dim

cslam.nns_matching.NearestNeighborsMatching.dim

Definition at line 17 of file nns_matching.py.

◆ items

cslam.nns_matching.NearestNeighborsMatching.items

Definition at line 18 of file nns_matching.py.

◆ n

cslam.nns_matching.NearestNeighborsMatching.n

Definition at line 16 of file nns_matching.py.


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