assignDetectionsToTracks with parameter of costOfNonAssignment

조회 수: 2 (최근 30일)
Haider Ali
Haider Ali 2016년 10월 20일
댓글: Horst Steuer 2018년 5월 16일
Hi,
I am working on multiobject tracking and using assignDetectionsToTracks for Hungarian assignment. I am having problems with the parameter of costOfNonAssignment. Fro example, consider the following costMatrix:
costMatrix = [1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16]
Assigning the detections to tracks with costOfNonAssignment = 9:
[matches, unassignedTracks, unassignedDetections] = assignDetectionsToTracks(costMatrix, 9)
The output is:
matches =
4 1
3 2
2 3
1 4
All the tracks have been assigned irrespective of my parameter of costOfNonAssignment = 9. For example, the match (4, 1) has a cost of 13 and match (3, 2) has a cost of 10 which are both greater than my parameter of costOfNonAssignment.
Is this assignment correct? Should the last two tracks have not been assigned as there is no cost value in their rows which is less than my parameter of costOfNonAssignment?
Thank you.
  댓글 수: 2
Daniel Lyddy
Daniel Lyddy 2016년 11월 3일
I've been looking inside the source code for this function, and the way that MathWorks has coded up the internal getPaddedCost() function has me scratching my head, too. It looks like the padded tracks (rows) and detections (columns) have one and only one chance to latch on to a "real" detection or track, respectively.
Anyway, what you describe is exactly the way I thought it would work, but, after looking at the diagrams in the help documentation and that internal getPaddedCost() function code, that is definitely not the way it's coded.
Horst Steuer
Horst Steuer 2018년 5월 16일
I believe costOfNonAssignment is being incured twice in your example. You have an observation and don't assign it to a track: cost 9. You also have a track and do not assign an observation: cost 9. So combined it will cost 18, while your cost of assigning a observation to a track is at a maximum of 16. You might consider using assignDetectionsToTracks(costMatrix, unassignedTrackCost,unassignedDetectionCost) instead and set one of the latter costs to 0.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Tracking and Motion Estimation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by