i am currently getting myimages like this:
for i in range (0,10):
image, status = stream.wait()
if image.buffer_index == 3:
is there another and more elegant way to do this instead of stream.wait()?
there are diffrent ways to acquire images. Just have a look at the examples in
However, I’m not sure what you expect to be more elegant?
Why don’t you omit the software trigger and set the camera to free run?
Please also note, that omitting
stream.wait() would still acquire images into the ring buffer - at least as long as a free buffer is available. But without a blocking function like
stream.wait() you would most certainly over-trigger the camera.
more specifically i would like an Tutorial for Python which does the same as ringbuffer exmaple in CSharp or Delphi.
we are currently working on features that will provide more convenient features in Python.
E.g. supporting an UI integration, which is already possible today but would be to much for a tutorial.
Callbacks fired when the contend of a ring buffer image change, are also an upcoming feature.
What is possible (but undocumented) is accessing individual ring buffer images.
The ring buffer has many features of a standard python list.
Please note, that this is only reasonable if lock mode is on (set to cvb.RingBufferLockMode.On).
imageNr3 = device.stream.ring_buffer
for ring_buffer image in device.stream.ring_buffer:
Finally unlocking a ring buffer image (again lock mode must be on) is done by releasing the image.
del or via python
with device.stream.ring_buffer as imageNr3: