PW22-SBN-01 / dataset_pipeline

0 stars 0 forks source link

Get frames between timestamp #7

Closed AdityaNG closed 2 years ago

AdityaNG commented 2 years ago

In the Iterator classes, having a function with the following functionality would be useful

def get_item_between_timestamp(self, start_ts, end_ts, fault_delay=0.5):
    # TODO: Return frame between two given timestamps
    # TODO: Raise exception if delta between start_ts and minimum_ts is greater than fault_delay
    # TODO: Raise exception if delta between end_ts and maximum_ts is greater than fault_delay
    pass
AdityaNG commented 2 years ago

Done in https://github.com/PW22-SBN-01/dataset_pipeline/commit/8a82d05f7b60eeeee276f1465857d8a513eb4307

https://github.com/PW22-SBN-01/dataset_pipeline/blob/8a82d05f7b60eeeee276f1465857d8a513eb4307/dataset_helper/dataset_iterators.py#L103-L115

https://github.com/PW22-SBN-01/dataset_pipeline/blob/8a82d05f7b60eeeee276f1465857d8a513eb4307/dataset_helper/dataset_iterators.py#L234-L249