changing the TrackLogicState value in tracking with trackerGNN and making the tracker use the custom values in each time step.
10 views (last 30 days)
Show older comments
Hello, I am using SORT example for MOT (https://www.mathworks.com/help/fusion/ug/implement-simple-online-and-realtime-tracking.html). I want to put a condition on tracker that if condition A exist, the most recent update in tracks.TrackLogicState changes to 1 and the tracker also should use this changed history in next time step. I think because of lomitations of tracker object I can not do that. Any ideas?
0 Comments
Accepted Answer
Manish
on 5 Jan 2025 at 7:14
Hi alex,
I understand that you want to update the tracker based on condition A ,If condition A exists, update 'tracks.TrackLogicState'to 1, and use this change in the next time step.
You can achive this by iterating through the confirmed tracks and changing the 'TrackLogicState' to 1 and update the tracks.
Here is the code sample:
tracker = trackerGNN('TrackLogic', 'History');
for t = 1:numTimeSteps
%detections = getDetections(t);
confirmedTracks = updateTracks(tracker, detections, t);
% Apply custom logic condition A
for i = 1:numel(confirmedTracks)
if conditionA(confirmedTracks(i))
% Modify TrackLogicState based on condition A
confirmedTracks(i).TrackLogicState = 1;
end
end
% Store or use modified tracks for the next time step
customTracks = confirmedTracks; % or any other structure you need
end
Refer the links below for better understanding:
hope it helps!
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!