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 cvb.DeviceFactory.open(file) as emu_device:
i get this error:
File “…pythonProject/stream_emu.py”, line 17, in
** emu_device.stream.ring_buffer.change_count(10, 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
as an emulation device you can use the (newer) CVMock.vin 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 CVMock.vin 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).
your hint help me a bit.
i figured out if i use streaming_simple.py 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.
streaming_parallel.py looks nice and i can access RingBuffer
def handle_async_wait_result(self, 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?
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.