- It looks like you are using a multiple object tracker with multiple sources. You could check out the following example which uses a single source: https://www.mathworks.com/help/driving/ug/track-multiple-vehicles-using-a-camera.html#TrackMultipleVehiclesUsingCameraExample-2
- The velocity of each vehicle can be obtained from their tracks using getTrackVelocities: https://www.mathworks.com/help/driving/ref/gettrackvelocities.html#mw_0f6140c3-92aa-4a84-991e-fe45a431b770
- In case of the former, you might have to find a way to dynamically determine which tracker is better based on the properties of each detected object.
- In case of the latter, you might have to figure out a way to combine the estimation, assignment, updating, and deletion functionalities of all the trackers assigned to the detected object, which might get complicated to implement.