Skip to content

Commit

Permalink
fix alignement
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmagne committed Jun 17, 2024
1 parent ccfd9e4 commit d6aafec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion align-rec/aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def align(
t_micro = (
cap.get(cv2.CAP_PROP_POS_MSEC) * 1000
) # Frame timestamp in microseconds
while inputs["time"][i] < t_micro: # Find the closest timestamp in inputs
while (
inputs["time"][i] < t_micro and i < inputs.shape[0] - 1
): # Find the closest timestamp in inputs
i += 1

# Pick the closest timestamp between the two neighbors
Expand Down

0 comments on commit d6aafec

Please sign in to comment.