set_image_source_paramT_set_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param (Operator)

Name

set_image_source_paramT_set_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param — Set a parameter of an image source.

Signature

set_image_source_param( : : ImageSourceHandle, Param, GenParamName, GenParamValue, Value : )

Herror T_set_image_source_param(const Htuple ImageSourceHandle, const Htuple Param, const Htuple GenParamName, const Htuple GenParamValue, const Htuple Value)

void SetImageSourceParam(const HTuple& ImageSourceHandle, const HTuple& Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value)

void HImageSource::SetImageSourceParam(const HString& Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value) const

void HImageSource::SetImageSourceParam(const char* Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value) const

void HImageSource::SetImageSourceParam(const wchar_t* Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value) const   ( Windows only)

static void HOperatorSet.SetImageSourceParam(HTuple imageSourceHandle, HTuple param, HTuple genParamName, HTuple genParamValue, HTuple value)

void HImageSource.SetImageSourceParam(string param, HTuple genParamName, HTuple genParamValue, HTuple value)

def set_image_source_param(image_source_handle: HHandle, param: str, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, float, str]], value: Sequence[Union[str, float, int]]) -> None

Description

The operator set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param sets the parameter values for an image source handle ImageSourceHandleImageSourceHandleImageSourceHandleimageSourceHandleimage_source_handle to ValueValueValuevaluevalue.

For further information about the image source concept see Image Source.

The parameter needs to be specified using ParamParamParamparamparam. It depends on the image source and its state, which parameters are available and can be set. Device parameters are specific to the hardware or software manufacturer.

The value, the parameter should be set to is passed in ValueValueValuevaluevalue. Parameters of type 'command'"command""command""command""command" can be executed by setting ValueValueValuevaluevalue to 'execute'"execute""execute""execute""execute".

The parameter group can be specified using the generic parameters. You have the following options for GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name:

'group'"group""group""group""group"

Specify the parameter group the parameter is found in with GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value by setting one of these options:

  • 'image_source'"image_source""image_source""image_source""image_source",

  • 'plugin'"plugin""plugin""plugin""plugin",

  • 'interface'"interface""interface""interface""interface",

  • 'local_device'"local_device""local_device""local_device""local_device",

  • 'device'"device""device""device""device",

  • 'easy_device'"easy_device""easy_device""easy_device""easy_device",

  • 'stream'"stream""stream""stream""stream".

When setting no generic parameters, GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name = 'group'"group""group""group""group" and GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value = 'device'"device""device""device""device" are assumed by default.

The group 'image_source'"image_source""image_source""image_source""image_source" is always available, whereas a connection is needed for the other parameter groups.

'command_wait'"command_wait""command_wait""command_wait""command_wait"

Wait for the end of the command execution (blocking operation).

List of values: 'false'"false""false""false""false", 'true'"true""true""true""true"

Default: 'true'"true""true""true""true"

Restriction: Only valid for a ParamParamParamparamparam of type 'command'"command""command""command""command".

'command_wait_interval'"command_wait_interval""command_wait_interval""command_wait_interval""command_wait_interval"

Polling interval in [ms] to check if the command execution finished.

Default: 100

Restriction: Only valid for a ParamParamParamparamparam of type 'command'"command""command""command""command".

'command_wait_timeout'"command_wait_timeout""command_wait_timeout""command_wait_timeout""command_wait_timeout"

Time in [ms] to wait for end of the command execution.

Default: 5000

Restriction: Only valid for a ParamParamParamparamparam of type 'command'"command""command""command""command".

Image Source Handle Parameters

Parameters of the 'image_source'"image_source""image_source""image_source""image_source" group are always available. The following list gives an overview, which of those parameters can be set using set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param. A description of the parameters can be found in get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param.

'device_access_flags'"device_access_flags""device_access_flags""device_access_flags""device_access_flags"
'device_id'"device_id""device_id""device_id""device_id"
'device_query_timeout'"device_query_timeout""device_query_timeout""device_query_timeout""device_query_timeout"
'device_user_name'"device_user_name""device_user_name""device_user_name""device_user_name"
'device_serial_number'"device_serial_number""device_serial_number""device_serial_number""device_serial_number"
'fetch_timeout'"fetch_timeout""fetch_timeout""fetch_timeout""fetch_timeout"
'interface_id'"interface_id""interface_id""interface_id""interface_id"
'interface_query_timeout'"interface_query_timeout""interface_query_timeout""interface_query_timeout""interface_query_timeout"
'num_buffers'"num_buffers""num_buffers""num_buffers""num_buffers"
'plugin_name'"plugin_name""plugin_name""plugin_name""plugin_name"
'plugin_path'"plugin_path""plugin_path""plugin_path""plugin_path"
'stream_id'"stream_id""stream_id""stream_id""stream_id"

Image Source Easy Device Parameters

Parameters of the 'easy_device'"easy_device""easy_device""easy_device""easy_device" group become available after successfully connecting to a device using connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source. While the following parameters are implemented, the availability of individual parameters in this group depends on the connected device. A detailed description of the parameters can be found in get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param.

'exposure'"exposure""exposure""exposure""exposure"
'exposure_auto'"exposure_auto""exposure_auto""exposure_auto""exposure_auto"
'gain'"gain""gain""gain""gain"
'gain_auto'"gain_auto""gain_auto""gain_auto""gain_auto"
'trigger'"trigger""trigger""trigger""trigger"
'trigger_activation'"trigger_activation""trigger_activation""trigger_activation""trigger_activation"
'trigger_delay'"trigger_delay""trigger_delay""trigger_delay""trigger_delay"
'trigger_software'"trigger_software""trigger_software""trigger_software""trigger_software"

Additional Documentation Sources

For plugins provided by MVTec, the MVTec Interfaces Reference Documentation describes all plugin-specific parameters.

For further parameters, check the documentation of the respective software or hardware manufacturer.

Execution Information

Parameters

ImageSourceHandleImageSourceHandleImageSourceHandleimageSourceHandleimage_source_handle (input_control)  image_source → HImageSource, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Image source handle.

ParamParamParamparamparam (input_control)  string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Parameter whose value is to be set.

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Generic parameter name.

Default: []

Suggested values: 'group'"group""group""group""group", 'command_wait'"command_wait""command_wait""command_wait""command_wait", 'command_wait_timeout'"command_wait_timeout""command_wait_timeout""command_wait_timeout""command_wait_timeout", 'command_wait_interval'"command_wait_interval""command_wait_interval""command_wait_interval""command_wait_interval"

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value-array → HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Generic parameter value.

Default: []

Suggested values: 'image_source'"image_source""image_source""image_source""image_source", 'plugin'"plugin""plugin""plugin""plugin", 'interface'"interface""interface""interface""interface", 'local_device'"local_device""local_device""local_device""local_device", 'device'"device""device""device""device", 'easy_device'"easy_device""easy_device""easy_device""easy_device", 'stream'"stream""stream""stream""stream", 1, 5000, 100

ValueValueValuevaluevalue (input_control)  string-array → HTupleSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Value to be set.

Example (HDevelop)

* Configure or change the 'device_id' of the ImageSource (before the connect).
set_image_source_param (ImageSourceHandle,'device_id', 'group', 'image_source', '<desired_device_id>')
* Configure the ExposureTime of the connected camera (notice per default 'group'='device').
set_image_source_param (ImageSourceHandle, 'ExposureTime', [], [], 50000)
* Execute a software trigger (notice per default 'group'='device') without waiting for the end of the execution.
set_image_source_param (ImageSourceHandle, 'TriggerSoftware', 'command_wait', 0,'execute')
* Configure the handling of image buffers in the stream module.
set_image_source_param (ImageSourceHandle, 'StreamBufferHandlingMode', 'group', 'stream', 'NewestOnly')

Result

If the parameter values are correct, set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param returns the value 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

query_image_sourcesquery_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sources, create_image_sourcecreate_image_sourceCreateImageSourceCreateImageSourcecreate_image_source, connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source

Possible Successors

get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param, disconnect_image_sourcedisconnect_image_sourceDisconnectImageSourceDisconnectImageSourcedisconnect_image_source

See also

get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param

Module

Foundation