confirmBranch
Description
Examples
Confirm Track Branch
Create a trackerTOMHT
system object.
tracker = trackerTOMHT;
Create two objectDetection
objects and use them to update the tracker.
detection1 = objectDetection(0,[1;1;1]); detection2 = objectDetection(1,[1.1;1.2;1.3])
detection2 = objectDetection with properties: Time: 1 Measurement: [3x1 double] MeasurementNoise: [3x3 double] SensorIndex: 1 ObjectClassID: 0 ObjectClassParameters: [] MeasurementParameters: {} ObjectAttributes: {}
tracker(detection1,0); [cofirmedTracks,~,~,info]=tracker(detection2,1);
Currently, the tracker does not confirm any track. The tracker maintains two branches.
noConfirmedTracks = isempty(cofirmedTracks)
noConfirmedTracks = logical
1
branchIDs = info.BranchIDsAtStepEnd
branchIDs = 1x2 uint32 row vector
1 2
Confirm the second branch using the confirmBranch
object function.
confirmed = confirmBranch(tracker,branchIDs(2))
confirmed = logical
1
Update the tracker with an empty objectDetection
object. Now the tracker maintains one confirmed track.
confirmTracks = tracker(objectDetection.empty(),2)
confirmTracks = objectTrack with properties: TrackID: 1 BranchID: 1 SourceIndex: 0 UpdateTime: 2 Age: 3 State: [6x1 double] StateCovariance: [6x6 double] StateParameters: [1x1 struct] ObjectClassID: 0 ObjectClassProbabilities: 1 TrackLogic: 'Score' TrackLogicState: [9.1050 13.7102] IsConfirmed: 1 IsCoasted: 1 IsSelfReported: 1 ObjectAttributes: [1x1 struct]
Input Arguments
tracker
— TOMHT tracker
trackerTOMHT
object
TOMHT tracker, specified a trackerTOMHT
object.
branchID
— Track branch identifier
positive integer
Track branch identifier, specified as a positive integer.
Example: 2
Output Arguments
confirmed
— Indicate if track branch is successfully confirmed
1
| 0
Indicate if the track branch is successfully confirmed, returned as
1
or 0
. If the track branch specified by the
branchID
input exists, the function confirms the track branch and
returns 1
. If the track branch does not exist, the function issues a
warning and returns false
.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2022b
See Also
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)