CVB.py IDS camera stream

Hello,

I am using a IDS camera. I have installed the camera driver as well as the cvb camera driver. Everything should work fine. When I do the following task. everything works:

import cvb
import os
import numpy as np
import matplotlib.pyplot as plt

path = "%CVB%/Drivers/CVuEye.vin"
path_exp = os.path.expandvars(path)
device = cvb.DeviceFactory.open(path_exp)
stream = device.stream
stream.start()

img,status=stream.wait()

But as soon as I do the folliwing, my Kernel dies. I have no clue what’s the problem. I already changed the format to mono 8 in the ini file.

img_mat=cvb.as_array(img)
–> Kernel dies in Spyder

I hope anybody can help me :slight_smile: Thank you

Hi @michaelbe,

first, there is nothing wrong with your code that is the intended way to use it!

However, crashing the kernel is clearly a bug on our side! As there have been recent changes to CVBpy this might have been fixed. I just checked with my current version and it works fine.

My current version will be available as nightly setup tomorrow!
If the error persists please contact support@stemmer-imaging.de and tell us:

  • OS Version and architecture
  • current CVBpy version (includes also dynamic information)
cvb.version()
  • CVuEye.vin version.

Furthermore you may check with a different device type like “%CVB%\Tutorial\ClassicSwitch.emu”.

Hello Andreas,

thank you very much for your quick response. I have updtated my cvb.py.
When I do the following:

img_mat=cvb.as_array(img)

I get this error-message:

failed to create numpy array

I will update cvb.py tmorrow and try it again.

Thanks

Yes this one I fixed just today. In tomorrow’s setup it should be gone!

Hello Andreas,

I just tried it again, but it still fails when doing cvb.as_array(img). I downloaded the cvb.py at the following link.

https://forum.commonvisionblox.com/t/getting-started-with-cvbpy/241

This may be incorrect. Could you send me a correct link for downloading cvb.py.

Tank you very much.

Kernel_Dies