This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

clusterTrackBranches

Cluster track-oriented multi-hypothesis history

Syntax

[clusters,incompatibleBranches] = clusterTrackBranches(branchHistory)
[clusters,incompatibleBranches] = clusterTrackBranches(branchHistory,'OutputForm',out)

Description

example

[clusters,incompatibleBranches] = clusterTrackBranches(branchHistory) computes the clusters and incompatibility matrix for a set of branches.

Branches i, j, and k belong to the same cluster if branches i and j are pairwise-incompatible and branches j and k are pairwise-incompatible. Two branches are pairwise-incompatible if they share a track ID (the first column of branchHistory) or if they share detections that fall in their gates during the number of recent scans as specified by the history depth.

[clusters,incompatibleBranches] = clusterTrackBranches(branchHistory,'OutputForm',out) returns the clusters in the format specified by out.

Examples

collapse all

Create a branch history matrix for 12 branches. For this example, the branch history matrix has 11 columns that represent the history of 2 sensors with a history depth of 4.

branchHistory = uint32([     
    4     9     9     0     0     1     0     0     0     0     0
    5    10    10     0     0     0     2     0     0     0     0
    6    11    11     0     0     3     0     0     0     0     0
    1    12    12     0     0     1     0     1     0     0     0
    1    13    13     0     0     0     2     1     0     0     0
    1    14    14     0     0     1     2     1     0     0     0
    2    15    15     0     0     3     0     3     0     0     0
    3    16    16     0     0     0     4     0     4     0     0
    7     0    17     1     0     0     0     0     0     0     0
    1     5    18     1     0     0     0     0     2     0     0
    1     5    19     0     2     0     0     0     2     0     0
    1     5    20     1     2     0     0     0     2     0     0]);

Get the list of clusters and the list of incompatible branches. The clusters matrix has three columns, therefore there are three clusters.

[clusters,incompBranches] = clusterTrackBranches(branchHistory);
size(clusters)
ans = 1×2

    12     3

Show the incompatible branches as a graph. The numeric branch IDs are in the third column of branchHistory. To display the IDs of the branches on the graph, convert the IDs to character vectors. You can see the three distinct clusters.

branchIDs = cellstr(num2str(branchHistory(:,3)));
g = graph(incompBranches,branchIDs,'omitselfloops');
plot(g)

Input Arguments

collapse all

Branch history, specified as a matrix of integers. Each row of branchHistory represents a unique track branch. branchHistory must have 3+(D×S) columns, where D is the number of maintained scans (the history depth) and S is the maximum number of maintained sensors. For more information, see the history output of the trackBranchHistory system object.

Output form of the returned clusters, specified as 'logical', 'vector', or 'cell'.

Output Arguments

collapse all

Clusters, returned as one of the following. The format of clusters is specified by out.

  • An M-by-P logical matrix. M is the number of branches (rows) in branchHistory and P is the number of clusters. The (i,j) element is true if branch j is contained in cluster i. The value of P is less than or equal to M.

  • A vector of length M, where the i-th element gives the index of the cluster that contains branch i.

  • A cell array c, where c{j} contains the IDs of all the branches in cluster j.

Data Types: logical

Incompatible branches, returned as an M-by-M symmetric logical matrix. The (i,j) element is true if branches i and j are pairwise-incompatible.

Data Types: logical

References

[1] Werthmann, John R. "A Step-by-Step Description of a Computationally Efficient Version of Multiple Hypothesis Tracking." In Proceedings of SPIE Vol. 1698, Signal and Processing of Small Targets. 1992, pp. 288–300. doi: 10.1117/12.139379.

Extended Capabilities

Introduced in R2018b