Skip to content

Commit

Permalink
Update ForwardTrackAlgorithm.cs
Browse files Browse the repository at this point in the history
Issue #370 Do not add very short tracks to list of potential events
  • Loading branch information
towsey committed Sep 17, 2020
1 parent bdb8077 commit 276dc75
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/AudioAnalysisTools/Tracks/ForwardTrackAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ public static List<Track> GetForwardTracks(double[,] peaks, double minDuration,

// Visit each spectral peak in order. Each may be start of possible track
var track = GetForwardTrack(peaks, row, col, threshold, converter);
tracks.Add(track);

// a forward track should have length >2
if (track.PointCount > 2)
{
tracks.Add(track);
}
}
}

Expand Down

0 comments on commit 276dc75

Please sign in to comment.