Getting Started with CVBpy

Configure a Device with the GenApi

Usually you will have to configure some things in a camera before the image fits your needs. Sometimes you might even have a lot of cameras which all need the same settings applied automatically. Here comes how you can script it.

  1. Open your device as described above.
  1. Get the device node map, which groups all settings for your camera (device).
device_node_map = vin_device.node_maps["Device"]
  1. Now you can access the camera features. Let’s start reading some stuff.
print("Vendor:  " + device_node_map["DeviceVendorName"].value)
print("Model:   " + device_node_map["DeviceModelName"].value)
print("Version: " + device_node_map["DeviceVersion"].value)

The value property is also used to write (if the node is writeabel) features to the camera. In the debugger you can see a lot of additional information that will help you to pick the right values. E.g:

exposure = device_node_map["ExposureTime"]

image

1 Like