Main Content

initializeBranch

Initialize new track branch

Description

branchID = initializeTrack(tracker,branch) initializes a new track branch in the tracker. The tracker must be updated at least once before initializing a track branch. If the track is initialized successfully, the tracker assigns the output branchID to the branch, set the UpdateTime of the branch equal to the last step time, and synchronizes the data in the input branch to the initialized branch.

A warning is issued if the tracker already maintains the maximum number of track branches specified by the MaxNumTrackBranches property of the tracker. In this case, the branchID is returned as zero, which indicates a failure to initialize the branch.

Note

This syntax doesn't support using the trackingGSF, trackingPF, or trackingIMM filter object as the internal tracking filter for the tracker. Use the second syntax for these cases.

branchID = initializeTrack(tracker,branch,filter) initializes a new track branch in the tracker using a specified tracking filter, filter.

Note

If the tracking filter used in the tracker is trackingGSF, trackingPF, or trackingIMM, you must use this syntax instead of the first syntax.

Input Arguments

collapse all

TOMHT tracker, specified a trackerTOMHT object.

New track to be initialized, specified as an objectTrack object or a structure. If specified as a structure, the name, variable type, and data size of the fields of the structure must be the same as the name, variable type, and data size of the corresponding properties of the objectTrack object outputted by the tracker.

Data Types: struct | object

Output Arguments

collapse all

Track identifier, returned as a nonnegative integer. trackID is returned as 0 if the branch is not initialized successfully.

Example: 2

See Also

Introduced in R2020a