8#ifndef OCEAN_CV_DETECTOR_BULLSEYES_ASSIGNMENTSOLVER_H
9#define OCEAN_CV_DETECTOR_BULLSEYES_ASSIGNMENTSOLVER_H
This class solves assignment problems using the Hungarian/Kuhn-Munkres algorithm.
Definition AssignmentSolver.h:50
static constexpr Index32 invalidIndex()
Returns an invalid index value used as a sentinel for unassigned rows/columns.
Definition AssignmentSolver.h:118
static bool solve(CostMatrix &&costMatrix, Assignments &assignments)
Solves the assignment problem for the given cost matrix using the Hungarian/Kuhn-Munkres algorithm.
IndexPair32 Assignment
An alias for an index pair.
Definition AssignmentSolver.h:57
static void findAugmentingPath(const CostMatrix &costMatrix, const size_t yStart, Indices32 &yAssignments, Indices32 &xAssignments, std::vector< uint8_t > &yVisited, std::vector< uint8_t > &xVisited, Indices32 &yParents)
Attempts to find an augmenting path starting from a given row using breadth-first search.
static void subtractRowAndColumnMinima(CostMatrix &costMatrix)
Performs the initial cost reduction by subtracting row and column minima from the cost matrix.
Matrix CostMatrix
The type of the cost matrix.
Definition AssignmentSolver.h:54
static bool reduceCostMatrix(const Indices32 &yAssignments, CostMatrix &costMatrix, std::vector< uint8_t > &yMarked, std::vector< uint8_t > &xMarked)
Reduces the cost matrix when no complete assignment can be found with current zeros.
IndexPairs32 Assignments
An alias for a vector of index pairs.
Definition AssignmentSolver.h:60
std::pair< Index32, Index32 > IndexPair32
Definition of a pair holding 32 bit indices.
Definition Base.h:138
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
std::vector< IndexPair32 > IndexPairs32
Definition of a vector holding 32 bit index pairs.
Definition Base.h:144
MatrixT< Scalar > Matrix
Definition of the Matrix object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single ...
Definition Matrix.h:25
std::vector< Bullseye > Bullseyes
Definition of a vector holding bullseyes.
Definition Bullseye.h:245
Namespace of the CV Detector library.
Definition Barcode.h:19
Namespace of the CV library.
Definition Advanced.h:17
The namespace covering the entire Ocean framework.
Definition Accessor.h:15