Dear Community,
I am working on a project involving an event camera and have created a Python class to manage it. One of the class attributes, self.cam, is an initialized HAL device. The class includes a method, continuous_acquire_events, designed to enable real-time preview of event camera data. In this method, I create an EventsIterator to iterate over events and display them until the preview is stopped. After stopping the preview, I explicitly delete the EventsIterator using del.
Theoretically, I should be able to call this method multiple times to start a second, third, or subsequent preview sessions. However, I am encountering inconsistent behavior: sometimes the method works for multiple previews, but other times it fails on the second attempt with an error. Below, I have provided the relevant code and the error traceback.
Additionally, I have noticed that my implementation does not achieve the high real-time performance seen in the official Metavision software. The preview often experiences increasing latency over time, which affects the responsiveness of the application.