Distorted pictures on first run after camera boot - second run works fine

Do you set nodes like image width / height or pixel format?

Since the buffer for the images are being allocated when loading the driver, changing the image size will lead to a mismatch between buffer size (and it’s interpretation) and the actual data you receive.

To avoid a driver reload by hand, you can use the ImageRect Interface like so:

new_size = cvb.Size2D(width = 640, height = 480)
device.image_rect.apply_size(new_size, cvb.DeviceUpdateMode.UpdateDeviceImage)

This will automatically resize the buffer for you.

Please let me know, if that fixed at least some of your problems :grin:

2 Likes