confirmBranch
Description
Examples
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: [3×1 double] MeasurementNoise: [3×3 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 = 1×2 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: [6×1 double] StateCovariance: [6×6 double] StateParameters: [1×1 struct] ObjectClassID: 0 ObjectClassProbabilities: 1 TrackLogic: 'Score' TrackLogicState: [9.1050 13.7102] IsConfirmed: 1 IsCoasted: 1 IsSelfReported: 1 ObjectAttributes: [1×1 struct]
Input Arguments
TOMHT tracker, specified a trackerTOMHT
object.
Track branch identifier, specified as a positive integer.
Example: 2
Output Arguments
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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- 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)