alliedvision / VimbaPython

Old Allied Vision Vimba Python API. The successor to this API is VmbPy
BSD 2-Clause "Simplified" License
93 stars 40 forks source link

Why is cam.queue_frame necessary at the end of each frame handler? #85

Open lukazso opened 2 years ago

lukazso commented 2 years ago

I just profiled a standard frame handler in the vimba python package and trying to trigger one camera via software trigger. I noticed that on average the cam.queue_frame operation - which is required according to the documentation - takes on average 10ms, which is a time I would like to safe. The documentation says this is necessary to reuse the frame. However, I do not want to reuse already used frames. Yet, when I do not perform this operation at the end of my frame handler, the callback is just executed for the first 10 or 15 times or so, then its simply ignored and nothing happens anymore. Is there a way to avoid queuing the already used frame back to the camera and still get it running properly?

nordeh commented 2 years ago

The callback is generally executed for the number of queued frames. You can increase the number of frames queued at cam.start_streaming().