timestamps property

List<double> get timestamps

Upstream _calculate_timestamps: the mean time of each group's frames, the last group padded with its final frame.

Implementation

List<double> get timestamps {
  final t = groups.first.temporalPatchSize;
  final indices = [...frameIndices];
  while (indices.length % t != 0) {
    indices.add(indices.last);
  }
  return [
    for (var i = 0; i < indices.length; i += t)
      (indices[i] + indices[i + t - 1]) / (2 * fps),
  ];
}