better-flow / evimo

A toolkit for dataset generation with event-based cameras
GNU General Public License v3.0
45 stars 8 forks source link

Easy way to get corresponding events given GT flow? #27

Closed HTLeoo closed 1 year ago

HTLeoo commented 1 year ago

Hi, thanks for the excellent work! It is easy to get optical flow using evimo_flow.py. If I want to get corresponding events, however, it seems that I need to add the ros_time_offset to the 'dataset_events_t' and searchsorted it to get corresponding index to cut the events off. Is there an easier way I haven't noticed in your tools, or I just need to do it like this?

aftersomemath commented 1 year ago

Currently, yes. Thanks for bringing this to my attention.

The process can be made simpler. evimo_flow.py was originally written for an application that required searching the raw ROS bag files for the events. Thus ros_time_offset was used.

However, that is not the typical use case. So, I will push an update to make not adding ros_time_offset the default option in evimo_flow.py. Then you can just use search sorted on dataset_events_t.npy without adding any offsets.

HTLeoo commented 1 year ago

@aftersomemath Thanks for your response.