Accessing CVB Management Console Camera Properties via Python

Hello,
I’m trying to access and change the same camera properties that is accessible through the CVB Management Console, for example AOI-tracking and Camera Mode, using the Python API. I have tried to look in the documentation without any luck.

Edit.
I have found a way to read the properties via the NodeMap class dictonary “nodes”, but I still dont know how to change them.

Thank you for the help,
Trym

Hi @trymdh

you can find a tutorial that shows how to edit NodeMap values in your installation directory of CVB:

C:\Program Files\STEMMER IMAGING\Common Vision Blox\Tutorial\Image Manager\CVBpy\DeviceConfiguration

It shows the configuration of a camera for being software triggered and also how to execute the SoftwareTrigger:

import os
import cvb

device = cvb.DeviceFactory.open(os.path.join(cvb.install_path(), "drivers", "GenICam.vin"), port=0)
dev_node_map = device.node_maps["Device"]

triggerModeNode = dev_node_map["TriggerMode"]
triggerModeNode.value = "On"

triggerSourceNode = dev_node_map["TriggerSource"]
triggerSourceNode.value = "Software"

softwareTrigger = dev_node_map["TriggerSoftware"]
softwareTrigger.execute()

I hope this was what you were looking for.

Cheers
Chris

Thanks, I figured it out:)

Thank you for your time
Trym

1 Like

@Andreas how do you get the output of the additional node information in the image above? I’m using Python with VS code.

nvm, I got it :slight_smile:

Hi and welcome @ravikumar89!

I am sorry, but I honestly do not think that your post is making an actual contribution to the issue discussed here. If you think you can help, please be more specific than that.