MATLAB Answers

Multi-target tracking "assignDet​ectionsToT​racks" function has unexpected results?

2 views (last 30 days)
cui
cui on 2 Jul 2020
Commented: cui on 12 Sep 2020
When I use the "assignDetectionsToTracks" function, the 5th (row) tracking is associated with the (1)th col detection, and the threshold(costOfNonAssignment=1) I set is 1, and there should be no correlation. Why?
cost = [2.62407,1.93346,4.28524,0.0126375;
1.34658,3.33612,0.769382,3.78107;
2.04141,0.012594,3.98619,1.92012;
3.35982,2.04044,5.14111,1.01901;
1.59666,3.05409,2.13898,2.69844;
4.54989,6.35886,3.17712,6.65899];
costOfNonAssignment = 1;
[assignment,unassignedTracks,unassignedDetections] = ...
assignDetectionsToTracks(cost,costOfNonAssignment)
assignment =
4×2 uint32 matrix
5 1
3 2
2 3
1 4
unassignedTracks =
2×1 uint32 column vector
4
6
unassignedDetections =
0×1 empty uint32 column vector
As can be seen from the result assignment, the fifth track is associated with the first detection data, and the cost between them is 1.59666, and the threshold I set is 1, the cost is greater than the threshold, why the fifth track Related to the first test? Shouldn’t it belong to unassignedTracks?

  0 Comments

Sign in to comment.

Accepted Answer

Elad Kivelevitch
Elad Kivelevitch on 8 Sep 2020
The fifth row / first column is associated because if these were not associated you would incure a cost of unassignment for both row and column, meaning 1+1 = 2. 2 is greater than 1.59666 so the assignment is favored instead of unasignment.

  3 Comments

cui
cui on 11 Sep 2020
(chinese)你说的“1”意思是指未分配的行和列的个数吗?我的理解应该是跟踪和检测之间的距离阈值;试想下,把第5行第一列的值由1.5966改为2.5966,这样结果是我预期的样子,第一个检测值将会是未分配的检测(新检测值),而按照你的意思“meaning 1+1 = 2. 2 is greater than 1.59666 so the assignment is favored instead of unasignment.”,请问该如何理解这句话呢?
--------------------------------------------------------------------------------------------
(english) Do you mean the number of unallocated rows and columns by "1"? My understanding should be the distance threshold between tracking and detection; imagine changing the value in the first column of row 5 from 1.5966 to 2.5966, so the result is what I expected, the first detection value will be unassigned According to your meaning, "meaning 1+1 = 2. 2 is greater than 1.59666 so the assignment is favored instead of unasignment." How do you understand this sentence? Seems to be unexplainable in the new situation?
cost = [2.62407,1.93346,4.28524,0.0126375;
1.34658,3.33612,0.769382,3.78107;
2.04141,0.012594,3.98619,1.92012;
3.35982,2.04044,5.14111,1.01901;
2.59666,3.05409,2.13898,2.69844;
4.54989,6.35886,3.17712,6.65899];
costOfNonAssignment = 1;
[assignment,unassignedTracks,unassignedDetections] = ...
assignDetectionsToTracks(cost,costOfNonAssignment)
assignment =
3×2 uint32 matrix
3 2
2 3
1 4
unassignedTracks =
3×1 uint32 column vector
4
5
6
unassignedDetections =
uint32
1
Elad Kivelevitch
Elad Kivelevitch on 11 Sep 2020
Yes, exactly.
Ignoring all the other assignments made for this assignment, there are two options to assign row 5 to column 1 or not to assign row 5 to column 1.
If you assign row 5 to column 1, you have a cost of 1.59666.
If you don't assign them, row 5 is unassigned and column 1 is unassigned. This unassignment has a cost of:
  • Not assigning row 5: cost = 1
  • Not assigning column 1: cost = 1
  • Total cost of not assigning row 5 and column 1 = 2
Since the cost of assignment is 1.59666 and the cost of not assiging is 2, the algorithm correctly chooses to assign.
If you want to change that, you can reduce the cost of unassignment to 0.5, which is the equivalent of what you're looking for.
cui
cui on 12 Sep 2020
Thank you for your detailed explanation, 1+1=2, and the two 1s represent "unassignedTrackCost" and "unassignedDetectionCost" respectively. I can explain it by specifying the two costs in detail in the following way.
unassignedTrackCost = 0.5;
unassignedDetectionCost = 1;
[assignment,unassignedTracks,unassignedDetections] = ...
assignDetectionsToTracks(cost,unassignedTrackCost,unassignedDetectionCost)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!