ClassesClassesClassesClasses | | | | Operators

set_stereo_model_paramT_set_stereo_model_paramSetStereoModelParamset_stereo_model_paramSetStereoModelParamSetStereoModelParam (Operator)

Name

set_stereo_model_paramT_set_stereo_model_paramSetStereoModelParamset_stereo_model_paramSetStereoModelParamSetStereoModelParam — Set stereo model parameters.

Signature

set_stereo_model_param( : : StereoModelID, ParamName, ParamValue : )

Herror T_set_stereo_model_param(const Htuple StereoModelID, const Htuple ParamName, const Htuple ParamValue)

Herror set_stereo_model_param(const HTuple& StereoModelID, const HTuple& ParamName, const HTuple& ParamValue)

void HStereoModel::SetStereoModelParam(const HTuple& ParamName, const HTuple& ParamValue) const

void SetStereoModelParam(const HTuple& StereoModelID, const HTuple& ParamName, const HTuple& ParamValue)

void HStereoModel::SetStereoModelParam(const HTuple& ParamName, const HTuple& ParamValue) const

void HStereoModel::SetStereoModelParam(const HString& ParamName, const HTuple& ParamValue) const

void HStereoModel::SetStereoModelParam(const char* ParamName, const HTuple& ParamValue) const

void HOperatorSetX.SetStereoModelParam(
[in] VARIANT StereoModelID, [in] VARIANT ParamName, [in] VARIANT ParamValue)

void HStereoModelX.SetStereoModelParam(
[in] VARIANT ParamName, [in] VARIANT ParamValue)

static void HOperatorSet.SetStereoModelParam(HTuple stereoModelID, HTuple paramName, HTuple paramValue)

void HStereoModel.SetStereoModelParam(HTuple paramName, HTuple paramValue)

void HStereoModel.SetStereoModelParam(string paramName, HTuple paramValue)

Description

The operator set_stereo_model_paramset_stereo_model_paramSetStereoModelParamset_stereo_model_paramSetStereoModelParamSetStereoModelParam can be used to set diverse parameters for the stereo model StereoModelIDStereoModelIDStereoModelIDStereoModelIDStereoModelIDstereoModelID. Two types of parameters can be set with this operator - general and specific for surface reconstruction. Note that no specific parameters are provided for 3D point reconstruction.

General parameters:

By setting ParamNameParamNameParamNameParamNameParamNameparamName to one of the following values, general stereo model parameters can be set to the value passed in ParamValueParamValueParamValueParamValueParamValueparamValue:

'bounding_box'"bounding_box""bounding_box""bounding_box""bounding_box""bounding_box":

a tuple [x1,y1,z1,x2,y2,z2] specifying two opposite corner points P1=[x1,y1,z1] and P2=[x2,y2,z2] of a bounding box for the reconstructions. The bounding box defines a box in the space in the coordinate frame of the camera setup model used for the reconstruction (specified by CameraSetupModelID in create_stereo_modelcreate_stereo_modelCreateStereoModelcreate_stereo_modelCreateStereoModelCreateStereoModel). The reconstruction algorithms then clip any resulting reconstruction to this bounding box.

Furthermore, reconstruct_surface_stereoreconstruct_surface_stereoReconstructSurfaceStereoreconstruct_surface_stereoReconstructSurfaceStereoReconstructSurfaceStereo requires a valid bounding box for the estimation of the minimal and maximal disparity parameters for the pairwise disparity estimation (see set_stereo_model_image_pairsset_stereo_model_image_pairsSetStereoModelImagePairsset_stereo_model_image_pairsSetStereoModelImagePairsSetStereoModelImagePairs for more details).

For a valid bounding box, P1 must be the point on the front lower left corner and P1 - on the back upper right corner of the bounding box, i.e., x1<x2, y1<y2 and z1<z2. While the surface reconstruction will terminate in case of an invalid bounding box, the 3D point reconstruction algorithm simply ignores it, and it reconstructs all points (it can), without clipping them. Thus, you can turn off the result clipping for the 3D points reconstruction by passing the tuple [0,0,0,0,0,-1].

Note that because 'bounding_box'"bounding_box""bounding_box""bounding_box""bounding_box""bounding_box" is a tuple-valued parameter, it cannot be set in a single call of set_stereo_model_paramset_stereo_model_paramSetStereoModelParamset_stereo_model_paramSetStereoModelParamSetStereoModelParam together with other model parameters (see the paragraph "A note on tuple-valued model parameters" below).

Tuple format: [x1,y1,z1,x2,y2,z2]

'persistence'"persistence""persistence""persistence""persistence""persistence":

enables (ParamValueParamValueParamValueParamValueParamValueparamValue=1) or disables (ParamValueParamValueParamValueParamValueParamValueparamValue=0) the 'persistence'"persistence""persistence""persistence""persistence""persistence" mode of the stereo model. When in persistence mode, the model stores intermediate results of the reconstruction (currently only for reconstruct_surface_stereoreconstruct_surface_stereoReconstructSurfaceStereoreconstruct_surface_stereoReconstructSurfaceStereoReconstructSurfaceStereo), which can be inspected later by get_stereo_model_objectget_stereo_model_objectGetStereoModelObjectget_stereo_model_objectGetStereoModelObjectGetStereoModelObject.

Note that the model might need significant memory space in this mode. This can worsen the performance of the reconstruction algorithms and even lead to running out of memory, in particular for setups with many cameras and/or large images. Therefore, we recommend to enable this mode only for inspection and debugging a reconstruction with small data sets.

List of values: 0 (default), 1

Surface reconstruction parameters:

By setting ParamNameParamNameParamNameParamNameParamNameparamName to one of the following values, additional parameters specific for surface reconstruction can be set with ParamValueParamValueParamValueParamValueParamValueparamValue for a stereo model of type 'surface_pairwise'"surface_pairwise""surface_pairwise""surface_pairwise""surface_pairwise""surface_pairwise":

'rectif_interpolation'"rectif_interpolation""rectif_interpolation""rectif_interpolation""rectif_interpolation""rectif_interpolation":

Interpolation mode for the rectification maps (see set_stereo_model_image_pairsset_stereo_model_image_pairsSetStereoModelImagePairsset_stereo_model_image_pairsSetStereoModelImagePairsSetStereoModelImagePairs). Note that after changing this parameter you must call set_stereo_model_image_pairsset_stereo_model_image_pairsSetStereoModelImagePairsset_stereo_model_image_pairsSetStereoModelImagePairsSetStereoModelImagePairs again for the changes to take effect.

List of values: 'none'"none""none""none""none""none" (default), 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear"

'rectif_sub_sampling'"rectif_sub_sampling""rectif_sub_sampling""rectif_sub_sampling""rectif_sub_sampling""rectif_sub_sampling":

Sub-sampling factor for the rectification maps (see set_stereo_model_image_pairsset_stereo_model_image_pairsSetStereoModelImagePairsset_stereo_model_image_pairsSetStereoModelImagePairsSetStereoModelImagePairs). Note that after changing this parameter you must call set_stereo_model_image_pairsset_stereo_model_image_pairsSetStereoModelImagePairsset_stereo_model_image_pairsSetStereoModelImagePairsSetStereoModelImagePairs again for the changes to take efect.

Suggested values: 0.5, 0.66, 1.0 (default), 1.5, 2.0, 3.0, 4.0

'sub_sampling_step'"sub_sampling_step""sub_sampling_step""sub_sampling_step""sub_sampling_step""sub_sampling_step":

Sub-sampling step for the X, Y and Z image data resulting from the pairwise disparity estimation, before this data is used in its turn for the surface reconstruction (see reconstruct_surface_stereoreconstruct_surface_stereoReconstructSurfaceStereoreconstruct_surface_stereoReconstructSurfaceStereoReconstructSurfaceStereo).

Suggested values: 1, 2 (default), 3

'disparity_method'"disparity_method""disparity_method""disparity_method""disparity_method""disparity_method":

Method used to create disparity images from the image pairs (see reconstruct_surface_stereoreconstruct_surface_stereoReconstructSurfaceStereoreconstruct_surface_stereoReconstructSurfaceStereoReconstructSurfaceStereo). Currently, only the method 'binocular'"binocular""binocular""binocular""binocular""binocular" is supported, which internally calls the HALCON operator binocular_disparitybinocular_disparityBinocularDisparitybinocular_disparityBinocularDisparityBinocularDisparity.

List of values: 'binocular'"binocular""binocular""binocular""binocular""binocular" (default)

If the method 'binocular'"binocular""binocular""binocular""binocular""binocular" was selected for 'disparity_method'"disparity_method""disparity_method""disparity_method""disparity_method""disparity_method", the following parameters are available:

'point_meshing'"point_meshing""point_meshing""point_meshing""point_meshing""point_meshing":

Enables the post-processing step for meshing the reconstructed surface points. Currently, only a Poisson solver is supported (see reconstruct_surface_stereoreconstruct_surface_stereoReconstructSurfaceStereoreconstruct_surface_stereoReconstructSurfaceStereoReconstructSurfaceStereo for more details).

List of values: 'none'"none""none""none""none""none" (default), 'poisson'"poisson""poisson""poisson""poisson""poisson"

If the Poisson-based meshing is enabled, the following parameters can be set:

These parameters can be read back by get_stereo_model_paramget_stereo_model_paramGetStereoModelParamget_stereo_model_paramGetStereoModelParamGetStereoModelParam.

A note on tuple-valued model parameters

Most of the stereo model parameters are single-valued. Thus, you can provide a list (i.e., tuple) of parameter names and a list (tuple) of values that has the same length as the input tuple. In contrast, when setting a tuple-valued parameter, you must pass a tuple of values. When setting such a parameter together with other parameters, the value-to-parameter-name correspondence is not obvious anymore. Thus, tuple-valued parameters like 'bounding_box'"bounding_box""bounding_box""bounding_box""bounding_box""bounding_box" should always be set in a separate call to set_stereo_model_paramset_stereo_model_paramSetStereoModelParamset_stereo_model_paramSetStereoModelParamSetStereoModelParam.

Parallelization

Parameters

StereoModelIDStereoModelIDStereoModelIDStereoModelIDStereoModelIDstereoModelID (input_control)  stereo_model HStereoModel, HTupleHTupleHStereoModel, HTupleHStereoModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the stereo model.

ParamNameParamNameParamNameParamNameParamNameparamName (input_control)  attribute.name(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Names of the parameters to be set.

List of values: 'binocular_filter'"binocular_filter""binocular_filter""binocular_filter""binocular_filter""binocular_filter", 'binocular_mask_height'"binocular_mask_height""binocular_mask_height""binocular_mask_height""binocular_mask_height""binocular_mask_height", 'binocular_mask_width'"binocular_mask_width""binocular_mask_width""binocular_mask_width""binocular_mask_width""binocular_mask_width", 'binocular_method'"binocular_method""binocular_method""binocular_method""binocular_method""binocular_method", 'binocular_num_levels'"binocular_num_levels""binocular_num_levels""binocular_num_levels""binocular_num_levels""binocular_num_levels", 'binocular_score_thresh'"binocular_score_thresh""binocular_score_thresh""binocular_score_thresh""binocular_score_thresh""binocular_score_thresh", 'binocular_sub_disparity'"binocular_sub_disparity""binocular_sub_disparity""binocular_sub_disparity""binocular_sub_disparity""binocular_sub_disparity", 'binocular_texture_thresh'"binocular_texture_thresh""binocular_texture_thresh""binocular_texture_thresh""binocular_texture_thresh""binocular_texture_thresh", 'bounding_box'"bounding_box""bounding_box""bounding_box""bounding_box""bounding_box", 'disparity_method'"disparity_method""disparity_method""disparity_method""disparity_method""disparity_method", 'persistence'"persistence""persistence""persistence""persistence""persistence", 'point_meshing'"point_meshing""point_meshing""point_meshing""point_meshing""point_meshing", 'poisson_depth'"poisson_depth""poisson_depth""poisson_depth""poisson_depth""poisson_depth", 'poisson_samples_per_node'"poisson_samples_per_node""poisson_samples_per_node""poisson_samples_per_node""poisson_samples_per_node""poisson_samples_per_node", 'poisson_solver_divide'"poisson_solver_divide""poisson_solver_divide""poisson_solver_divide""poisson_solver_divide""poisson_solver_divide", 'rectif_interpolation'"rectif_interpolation""rectif_interpolation""rectif_interpolation""rectif_interpolation""rectif_interpolation", 'rectif_sub_sampling'"rectif_sub_sampling""rectif_sub_sampling""rectif_sub_sampling""rectif_sub_sampling""rectif_sub_sampling", 'sub_sampling_step'"sub_sampling_step""sub_sampling_step""sub_sampling_step""sub_sampling_step""sub_sampling_step"

ParamValueParamValueParamValueParamValueParamValueparamValue (input_control)  attribute.value-array HTupleHTupleHTupleVARIANTHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*) (double / Hlong / BSTR) (double / Hlong / char*)

Values of the parameters to be set.

Suggested values: 0, 0.3, 0.5, 1, 2, 3, 'binocular'"binocular""binocular""binocular""binocular""binocular", 'ncc'"ncc""ncc""ncc""ncc""ncc", 'none'"none""none""none""none""none", 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'interpolation'"interpolation""interpolation""interpolation""interpolation""interpolation", 'left_right_check'"left_right_check""left_right_check""left_right_check""left_right_check""left_right_check", 'poisson'"poisson""poisson""poisson""poisson""poisson"

Module

3D Metrology


ClassesClassesClassesClasses | | | | Operators