Skip to content

Commit

Permalink
Play around with the invisibleForTooLong parameter.
Browse files Browse the repository at this point in the history
Reduce the number of frames that an ant can be invisible before its
track is deleted, to reduce the length of tracks that go off frame.
This led to mild success! The pipeline now accurately tracks 16 of the 17
ants that actually cross the bridge. (see #18 for more details)
  • Loading branch information
aryarm committed Apr 26, 2019
1 parent 8e23130 commit 9726ae3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ant_tracking.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,17 @@ function deleteLostTracks()
return;
end

invisibleForTooLong = 20;
invisibleForTooLong = 4;
ageThreshold = 8;
visibilityThreshold = 0.6;

% Compute the fraction of the track's age for which it was visible.
ages = [tracks(:).age];
totalVisibleCounts = [tracks(:).totalVisibleCount];
visibility = totalVisibleCounts ./ ages;

% Find the indices of 'lost' tracks.
lostInds = (ages < ageThreshold & visibility < 0.6) | ...
lostInds = (ages < ageThreshold & visibility < visibilityThreshold) | ...
[tracks(:).consecutiveInvisibleCount] >= invisibleForTooLong;

% Delete lost tracks.
Expand Down

0 comments on commit 9726ae3

Please sign in to comment.