# assignmunkres

Munkres global nearest neighbor assignment algorithm

## Syntax

## Description

`[`

returns a table of `assignments`

,`unassignedrows`

,`unassignedcolumns`

] = assignmunkres(`costmatrix`

,`costofnonassignment`

)`assignments`

of detections to tracks using the
Munkres algorithm. The Munkres algorithm obtains an optimal solution to the global nearest
neighbor (GNN) assignment problem. An optimal solution minimizes the total cost of the
assignments.

The cost of each potential assignment is contained in the cost
matrix, `costmatrix`

. Each matrix entry represents the cost of a possible
assignments. Matrix rows represent tracks and columns represent detections. All possible
assignments are represented in the cost matrix. The lower the cost, the more likely the
assignment is to be made. Each track can be assigned to at most one detection and each detection
can be assigned to at most one track. If the number of rows is greater than the number of
columns, some tracks are unassigned. If the number of columns is greater than the number of
rows, some detections are unassigned. You can set an entry of `costmatrix`

to
`Inf`

to prohibit an assignment.

`costofnonassignment`

represents the cost of leaving tracks or
detections unassigned. Higher values increase the likelihood that every existing object is
assigned.

The function returns a list of unassigned tracks, `unassignedrows`

,
and a list of unassigned detections, `unassignedcolumns`

## Examples

## Input Arguments

## Output Arguments

## References

[1] Samuel S. Blackman and Popoli, R.
*Design and Analysis of Modern Tracking Systems*. Artech House:
Norwood, MA. 1999.

## Extended Capabilities

## Version History

**Introduced in R2018b**