Create EmuDevice

i’m very new to CVB and try to setup test Engine before start development
i created an emu file with some pictures and it’s working

but i can’t set buffersize:

with as emu_device:, cvb.DeviceUpdateMode.UpdateDeviceImage)

i get this error:
File “…pythonProject/”, line 17, in
**, cvb.DeviceUpdateMode.UpdateDeviceImage)**
SystemError: error return without exception set

i think because *.emu file has no driver information?
maybe it has to bee EmuDevice, but i can’t finde anything about how to create/use it

Hi efrick,

as an emulation device you can use the (newer) which is under %CVB%Drivers if you load a path or it should show up when doing a discovery for all devices. The configuration file with a short description how to use it is under %CVBDATA%Drivers. It basicially works like the emu device and you can set images or a folder of images to be loaded with a buffer count etc. The then acts like a camera device and will loop over the selected images with the set fps. Please also keep in mind that these camera emulations are ment to get you an image to test processing or get to know CVB but they do not fully support all device options (which would also partly depend on the device type).

1 Like

thx usernv,

your hint help me a bit.
i figured out if i use example

for i in range(10):
    image, status = stream.wait()
    if status == cvb.WaitStatus.Ok:

is to slow and blocking my application
i will grap images from GenICam for performance test and pass them to multiprocesses. looks nice and i can access RingBuffer :frowning:

def handle_async_wait_result(self, image, status):
    super().handle_async_wait_result(image, status)

but i would like to have access to Ringbuffer for Multiprocesses, is there a way to make a separate process from axample and have parallel processes to get images from RingBuffer directly?

Hi @efrick,

with the current setup this is not possible. You would need to copy the images in a shared memory region or serialize them and send them to the child process.