Operator Reference
get_sheet_of_light_param (Operator)
get_sheet_of_light_param
— Get the value of a parameter, which has been set in a sheet-of-light model.
Signature
get_sheet_of_light_param( : : SheetOfLightModelID, GenParamName : GenParamValue)
Description
The operator get_sheet_of_light_param
is used to query the values
of the different parameters of a sheet-of-light model. The names of the
desired parameters are passed in the generic parameter
GenParamName
, the corresponding values are returned in
GenParamValue
.
All these parameters can be set and changed at any time with the
operator set_sheet_of_light_param
.
It is not possible to query the values of several parameters with a single
operator call. In order to request the values of several parameters you have
to successively call of the operator get_sheet_of_light_param
.
The values of the following model parameters can be queried:
Measurement of the profiles:
- 'method' :
-
defines the method used to determine the position of the profile. The values 'default' and 'center_of_gravity' both refer to the same method, whereby the position of the profile is determined column by column with subpixel accuracy by computing the center of gravity of the gray values of all pixels fulfilling the condition:
- 'min_gray' :
-
the smallest gray values taken into account for the measurement of the position of the profile (see 'method' above).
- 'num_profiles' :
-
number of profiles for which memory has been allocated within the sheet-of-light model. By default, 'num_profiles' is set to 512. If this number of profiles is exceeded during the measurement, memory will be reallocated automatically at runtime. Since the reallocation process requires some time, we recommend to set 'num_profiles' to a reasonable value before the measurement is started.
- 'ambiguity_solving' :
-
this model parameter determines which candidate shall be chosen, if the determination of the position of the light line is ambiguous.
'first' : the first encountered candidate is returned. This method is the fastest.
'last' : the last encountered candidate is returned.
'brightest' : for each candidate, the brightness of the profile is computed and the candidate having the highest brightness is returned. The brightness is computed according to: where is the gray value of the pixel and n the number of pixels taken into consideration to determine the position of the profile.
- 'score_type' :
-
this model parameter selects which type of score will be calculated during the measurement of the disparity. The score values give an advice on the quality of the computed disparity.
'none' : no score is computed.
'width' : for each pixel of the disparity, a score value is set to the local width of the profile (i.e., the number of pixels used to compute the position of the profile).
'intensity' : for each pixel of the disparity, a score value is evaluated by computing the local intensity of the profile according to: where is the gray value of the pixel and n the number of pixels taken into consideration to determine the position of the profile.
Calibration of the measurement:
- 'calibration' :
-
extent of the calibration transformation which shall be applied to the disparity image:
'none' : no calibration transformation is applied.
'xz' : the calibration transformations which describe the geometrical properties of the measurement system (camera and light line projector) are taken into account, but the movement of the object during the measurement is not taken into account.
'xyz' : the calibration transformations which describe the geometrical properties of the measurement system (camera and light line projector) as well as the transformation which describe the movement of the object during the measurement are taken into account.
'offset_scale' : a simplified set of parameters to describe the setup, that can be used with default parameters or can be controlled by six parameters. Three of the parameters describe an anisotropic scaling: 'scale_x' describes the scaling of a pixel in column direction into the new x-axis, 'scale_y' describes the linear movement between two profiles, and 'scale_z' describes the scaling of to measured disparities into the new z-axis. The other three parameters describe the offset of the frame of reference of the resulting x,y,z values ('offset_x' , 'offset_y' , 'offset_z' ).
- 'camera_parameter' :
-
the internal parameters of the camera used for the measurement. Those parameters are required when the calibration extent has been set to 'xz' or 'xyz' .
- 'camera_pose' :
-
the pose of the world coordinate system relative to the camera coordinate system. This pose is required when the calibration extent has been set to 'xz' or 'xyz' .
- 'lightplane_pose' :
-
the pose of the light-plane coordinate system relative to the world coordinate system. The light-plane coordinate system must be chosen so that its plane z=0 coincides with the light plane described by the light line projector. This pose is required when the calibration extent has been set to 'xz' or 'xyz' .
- 'movement_pose' :
-
a pose representing the movement of the object between two successive profile images with respect to the measurement system built by the camera and the laser. This pose is required when the calibration extent has been set to 'xyz' .
- 'scale' :
-
with this parameter you can scale the 3D coordinates X, Y and Z that result when applying the calibration transformations to the disparity image. 'scale' must be specified as the ratio desired unit/original unit. The original unit is determined by the coordinates of the calibration object. If you use the standard calibration plate the original unit is meter. This parameter can only be set if the calibration extent has been set to 'offset_scale' , 'xz' or 'xyz' . By default, 'scale' is set to 1.0.
- 'scale_x' :
-
This value defines the width of a pixel in 3D space. The value is only applicable if the calibration extend is set to 'offset_scale' . By default, 'scale_x' is set to 1.0.
- 'scale_y' :
-
This value defines the linear movement between two profiles in 3D space. The value is only applicable if the calibration extend is set to 'offset_scale' . By default, 'scale_y' is set to 10.0.
- 'scale_z' :
-
This value defines the height of disparities in 3D space. The value is only applicable if the calibration extend is set to 'offset_scale' . By default, 'scale_z' is set to 1.0.
- 'offset_x' :
-
This value defines the x offset of reference frame for 3D results. The value is only applicable if the calibration extend is set to 'offset_scale' . By default, 'offset_x' is set to 0.0.
- 'offset_y' :
-
This value defines the y offset of reference frame for 3D results. The value is only applicable if the calibration extend is set to 'offset_scale' . By default, 'offset_y' is set to 0.0.
- 'offset_z' :
-
This value defines the z offset of reference frame for 3D results. The value is only applicable if the calibration extend is set to 'offset_scale' . By default, 'offset_z' is set to 0.0.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
SheetOfLightModelID
(input_control) sheet_of_light_model →
(handle)
Handle of the sheet-of-light model.
GenParamName
(input_control) attribute.name →
(string)
Name of the generic parameter that shall be queried.
Default: 'method'
List of values: 'ambiguity_solving' , 'calibration' , 'camera_parameter' , 'camera_pose' , 'lightplane_pose' , 'method' , 'min_gray' , 'movement_pose' , 'num_profiles' , 'offset_x' , 'offset_y' , 'offset_z' , 'scale' , 'scale_x' , 'scale_y' , 'scale_z' , 'score_type'
GenParamValue
(output_control) attribute.value(-array) →
(string / integer / real)
Value of the model parameter that shall be queried.
Result
The operator get_sheet_of_light_param
returns the value 2 (
H_MSG_TRUE)
if the given parameters are correct.
Otherwise, an exception will be raised.
Possible Predecessors
query_sheet_of_light_params
,
set_sheet_of_light_param
Possible Successors
measure_profile_sheet_of_light
,
set_sheet_of_light_param
,
apply_sheet_of_light_calibration
Module
3D Metrology