Imaging Control 4 C++ Library 1.2.0
|
This section describes how to query read and change properties of a component, usually the video capture device.
Properties are accessed through a ic4::PropertyMap. For example, to get the property map for the device properties of the video capture device opened by a grabber, call ic4::Grabber::devicePropertyMap(). Propery map objects are also available for driver settings (ic4::Grabber::driverPropertyMap), interfaces (ic4::Interface::interfacePropertyMap) and codec settings (ic4::VideoWriter::propertyMap).
Each property is identified by a string identifier, for example ExposureTime
or Gain
. Many property identifiers are defined by the GenICam Standard Feature Naming Convention (SFNC), but devices can also have additional device-specific properties.
Common property identifiers are defined in the ic4::PropId namespace.
Each property has a display name, a description, a type, and visibility and accessibility information. The display name can be used in user interfaces to show a friendly name for the property, while the description can contain additional information about the property's meaning and/or usage.
There are multiple functions to directly interact with properties, such as ic4::PropertyMap::setValue and its overloads that can be used to quickly configure the value of a property with a known type and value.
Detailed property information and configuration is achieved through an object-oriented interface. To get create a property object (ic4::Property), call ic4::PropertyMap::find() or its sibling functions, passing the property's known identifier.
A property object can be interrogated for generic property attributes, for example
Each type has different methods of interaction and can provide additional type-dependent information:
Width
or Height
of the ROI that is being read out from the image sensor.ExposureTime
or AcquisitionFrameRate
.PixelFormat
.Root
category. This tree can be used to structure user interfaces. To interact with category properties, call one of the ic4::PropCategory member functions.To convert a ic4::Property object into its derived form, call one of the conversion member functions such as ic4::Property::asCommand() or ic4::Property::asString().