Skip to content

create_stereo_modelCreateStereoModelCreateStereoModelcreate_stereo_modelT_create_stereo_model🔗

Short description🔗

create_stereo_modelCreateStereoModelCreateStereoModelcreate_stereo_modelT_create_stereo_model — Create a HALCON stereo model.

Signature🔗

create_stereo_model( camera_setup_model CameraSetupModelID, string Method, attribute.name GenParamName, attribute.value GenParamValue, out stereo_model StereoModelID )void CreateStereoModel( const HTuple& CameraSetupModelID, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* StereoModelID )static void HOperatorSet.CreateStereoModel( HTuple cameraSetupModelID, HTuple method, HTuple genParamName, HTuple genParamValue, out HTuple stereoModelID )def create_stereo_model( camera_setup_model_id: HHandle, method: str, gen_param_name: MaybeSequence[str], gen_param_value: Sequence[Union[float, int, str]] ) -> HHandle

Herror T_create_stereo_model( const Htuple CameraSetupModelID, const Htuple Method, const Htuple GenParamName, const Htuple GenParamValue, Htuple* StereoModelID )

void HStereoModel::HStereoModel( const HCameraSetupModel& CameraSetupModelID, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue )

void HStereoModel::HStereoModel( const HCameraSetupModel& CameraSetupModelID, const HString& Method, const HString& GenParamName, const HTuple& GenParamValue )

void HStereoModel::HStereoModel( const HCameraSetupModel& CameraSetupModelID, const char* Method, const char* GenParamName, const HTuple& GenParamValue )

void HStereoModel::HStereoModel( const HCameraSetupModel& CameraSetupModelID, const wchar_t* Method, const wchar_t* GenParamName, const HTuple& GenParamValue ) (Windows only)

public HStereoModel( HCameraSetupModel cameraSetupModelID, string method, HTuple genParamName, HTuple genParamValue )

public HStereoModel( HCameraSetupModel cameraSetupModelID, string method, string genParamName, HTuple genParamValue )

HStereoModel HCameraSetupModel::CreateStereoModel( const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue ) const

HStereoModel HCameraSetupModel::CreateStereoModel( const HString& Method, const HString& GenParamName, const HTuple& GenParamValue ) const

HStereoModel HCameraSetupModel::CreateStereoModel( const char* Method, const char* GenParamName, const HTuple& GenParamValue ) const

HStereoModel HCameraSetupModel::CreateStereoModel( const wchar_t* Method, const wchar_t* GenParamName, const HTuple& GenParamValue ) const (Windows only)

void HStereoModel::CreateStereoModel( const HCameraSetupModel& CameraSetupModelID, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue )

void HStereoModel::CreateStereoModel( const HCameraSetupModel& CameraSetupModelID, const HString& Method, const HString& GenParamName, const HTuple& GenParamValue )

void HStereoModel::CreateStereoModel( const HCameraSetupModel& CameraSetupModelID, const char* Method, const char* GenParamName, const HTuple& GenParamValue )

void HStereoModel::CreateStereoModel( const HCameraSetupModel& CameraSetupModelID, const wchar_t* Method, const wchar_t* GenParamName, const HTuple& GenParamValue ) (Windows only)

HStereoModel HCameraSetupModel.CreateStereoModel( string method, HTuple genParamName, HTuple genParamValue )

HStereoModel HCameraSetupModel.CreateStereoModel( string method, string genParamName, HTuple genParamValue )

void HStereoModel.CreateStereoModel( HCameraSetupModel cameraSetupModelID, string method, HTuple genParamName, HTuple genParamValue )

void HStereoModel.CreateStereoModel( HCameraSetupModel cameraSetupModelID, string method, string genParamName, HTuple genParamValue )

Description🔗

The operator create_stereo_modelCreateStereoModel creates a HALCON stereo model and returns a handle to it in StereoModelIDstereoModelIDstereo_model_id. The model provides functionality for reconstructing either 3D points or surfaces from a calibrated multi-view stereo camera setup specified in CameraSetupModelIDcameraSetupModelIDcamera_setup_model_id (refer to Calibration / Multi View for further details on calibration of multiple cameras).

For Methodmethodmethod='points_3d'"points_3d", a stereo model is created that, after being configured, can be passed to reconstruct_points_stereoReconstructPointsStereo. The latter reconstructs 3D points by intersecting lines of sight from point correspondences, extracted from multiple calibrated images (see reconstruct_points_stereoReconstructPointsStereo for more details).

For Methodmethodmethod='surface_pairwise'"surface_pairwise" or Methodmethodmethod='surface_fusion'"surface_fusion", a stereo model is created that, after being configured, can be passed to reconstruct_surface_stereoReconstructSurfaceStereo. The latter obtains disparity images from preselected image pairs in a calibrated multi-view stereo setup and fuses the collected 3D information in a single surface reconstruction (see reconstruct_surface_stereoReconstructSurfaceStereo for more details).

The parameters GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value can be used to set general model parameters. Alternatively, these parameters can be modified with the operator set_stereo_model_paramSetStereoModelParam before the corresponding reconstruction operator is called (see set_stereo_model_paramSetStereoModelParam for more details on the available model parameters).

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

CameraSetupModelIDcameraSetupModelIDcamera_setup_model_id (input_control) camera_setup_model → (handle)HTuple (HHandle)HCameraSetupModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle to the camera setup model.

Methodmethodmethod (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Reconstruction method.

Default: 'surface_pairwise'"surface_pairwise"
List of values: 'points_3d', 'surface_fusion', 'surface_pairwise'"points_3d", "surface_fusion", "surface_pairwise"

GenParamNamegenParamNamegen_param_name (input_control) attribute.name(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Name of the model parameter to be set.

Default: [][]
List of values: 'binocular_filter', 'binocular_mask_height', 'binocular_mask_width', 'binocular_method', 'binocular_mg_cycle_type', 'binocular_mg_default_parameters', 'binocular_mg_gradient_constancy', 'binocular_mg_gray_constancy', 'binocular_mg_initial_guess', 'binocular_mg_initial_level', 'binocular_mg_iterations', 'binocular_mg_post_relax', 'binocular_mg_pre_relax', 'binocular_mg_pyramid_factor', 'binocular_mg_smoothness', 'binocular_mg_solver', 'binocular_ms_consistency_check', 'binocular_ms_edge_smoothing', 'binocular_ms_similarity_measure', 'binocular_ms_sub_disparity', 'binocular_ms_surface_smoothing', 'binocular_num_levels', 'binocular_score_thresh', 'binocular_sub_disparity', 'binocular_texture_thresh', 'bounding_box', 'color', 'color_invisible', 'disparity_method', 'max_disparity', 'min_disparity', 'min_thickness', 'persistence', 'point_meshing', 'rectif_interpolation', 'rectif_method', 'resolution', 'smoothing', 'sub_sampling_step', 'surface_tolerance'"binocular_filter", "binocular_mask_height", "binocular_mask_width", "binocular_method", "binocular_mg_cycle_type", "binocular_mg_default_parameters", "binocular_mg_gradient_constancy", "binocular_mg_gray_constancy", "binocular_mg_initial_guess", "binocular_mg_initial_level", "binocular_mg_iterations", "binocular_mg_post_relax", "binocular_mg_pre_relax", "binocular_mg_pyramid_factor", "binocular_mg_smoothness", "binocular_mg_solver", "binocular_ms_consistency_check", "binocular_ms_edge_smoothing", "binocular_ms_similarity_measure", "binocular_ms_sub_disparity", "binocular_ms_surface_smoothing", "binocular_num_levels", "binocular_score_thresh", "binocular_sub_disparity", "binocular_texture_thresh", "bounding_box", "color", "color_invisible", "disparity_method", "max_disparity", "min_disparity", "min_thickness", "persistence", "point_meshing", "rectif_interpolation", "rectif_method", "resolution", "smoothing", "sub_sampling_step", "surface_tolerance"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Value of the model parameter to be set.

Default: [][]
Suggested values: -1, -2, -5, 0, 0.3, 0.5, 0.9, 1, 2, 3, 'census_dense', 'census_sparse', 'binocular', 'ncc', 'none', 'sad', 'ssd', 'bilinear', 'viewing_direction', 'geometric', 'false', 'very_accurate', 'accurate', 'fast_accurate', 'fast', 'v', 'w', 'none', 'gauss_seidel', 'multigrid', 'true', 'poisson', 'isosurface', 'interpolation', 'left_right_check', 'full_multigrid', 'binocular_mg', 'binocular_ms', 'smallest_distance', 'mean_by_distance', 'line_of_sight', 'mean_by_line_of_sight', 'median'-1, -2, -5, 0, 0.3, 0.5, 0.9, 1, 2, 3, "census_dense", "census_sparse", "binocular", "ncc", "none", "sad", "ssd", "bilinear", "viewing_direction", "geometric", "false", "very_accurate", "accurate", "fast_accurate", "fast", "v", "w", "none", "gauss_seidel", "multigrid", "true", "poisson", "isosurface", "interpolation", "left_right_check", "full_multigrid", "binocular_mg", "binocular_ms", "smallest_distance", "mean_by_distance", "line_of_sight", "mean_by_line_of_sight", "median"

StereoModelIDstereoModelIDstereo_model_id (output_control) stereo_model → (handle)HTuple (HHandle)HStereoModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the stereo model.

Combinations with other operators🔗

Combinations

Possible successors

set_stereo_model_paramSetStereoModelParam, set_stereo_model_image_pairsSetStereoModelImagePairs, reconstruct_surface_stereoReconstructSurfaceStereo, reconstruct_points_stereoReconstructPointsStereo

Module🔗

3D Metrology