Problems with getting started

#1

Hello there

Just to let you know I got not much experience in programming. I try to set up a JAI Camera for image aquiring. Now I am stuck in the Tutorial

This works fine:

image = cvb.Image("C:/Program Files/STEMMER IMAGING/Common Vision Blox/tutorial/Clara.png")

image.save("Clara.bmp")

m = cvb.as_array(image)

plt.imshow(m.transpose(), cmap="gray")

#Stream

emu_device = cvb.DeviceFactory.open("C:/Program Files/STEMMER IMAGING/Common Vision Blox/tutorial\\ClassicSwitch.emu")
stream = emu_device.stream
device_image = emu_device.device_image
print("Emu:")
print("Resolution: " + str(device_image.width) + " x " + str(device_image.height))
print("Frames: " + str(stream.image_count))

But here I can’t start the Image aquisition:
vin_device = cvb.DeviceFactory.open("C:/Program Files/STEMMER IMAGING/Common Vision Blox/drivers/GenICam.vin")

It always returns:

  File "<ipython-input-16-ef46b32b4d05>", line 1, in <module>
    vin_device = cvb.DeviceFactory.open("C:/Program Files/STEMMER IMAGING/Common Vision Blox/drivers/GenICam.vin")

RuntimeError: {C-API call failed} ({LoadImageFileW})

Thanks for some input

#2

I now solved this issue, there was a problem with the connection. But still I get no Images, just empty files.

#3

Hi @stmoe

which version of :cvb: is installed and which operating system are you using?

#5

I wonder how did you solve the problem of getting error “{C-API call failed} ({LoadImageFileW})”. I am currently experiencing exactly the same error when using cvb.DeviceFactory.open function.

#6

Hi @lxu,

loading the GenICam.vin requires a camera to be configured in advance.
You can do this using the GenICam Browser. Otherwise loading the driver will fail.