plugin  0.1.0
Public Member Functions | List of all members
KuhnMunkres Class Reference

The KuhnMunkres class. More...

#include <kuhn_munkres.hpp>

Public Member Functions

 KuhnMunkres (bool greedy=false)
 Initializes the class for assignment problem solving. More...
 
std::vector< size_t > Solve (const cv::Mat &dissimilarity_matrix)
 Solves the assignment problem for given dissimilarity matrix. It returns a vector that where each element is a column index for corresponding row (e.g. result[0] stores optimal column index for very first row in the dissimilarity matrix). More...
 

Detailed Description

The KuhnMunkres class.

Solves the assignment problem.

Constructor & Destructor Documentation

◆ KuhnMunkres()

KuhnMunkres::KuhnMunkres ( bool  greedy = false)
explicit

Initializes the class for assignment problem solving.

Parameters
[in]greedyIf a faster greedy matching algorithm should be used.

Member Function Documentation

◆ Solve()

std::vector< size_t > KuhnMunkres::Solve ( const cv::Mat &  dissimilarity_matrix)

Solves the assignment problem for given dissimilarity matrix. It returns a vector that where each element is a column index for corresponding row (e.g. result[0] stores optimal column index for very first row in the dissimilarity matrix).

Parameters
dissimilarity_matrixCV_32F dissimilarity matrix.
Returns
Optimal column index for each row. -1 means that there is no column for row.

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