prepare_object_model_3dT_prepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3d (Operator)

Name

prepare_object_model_3dT_prepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3d — Prepare a 3D object model for a certain operation.

Signature

prepare_object_model_3d( : : ObjectModel3D, Purpose, OverwriteData, GenParamName, GenParamValue : )

Herror T_prepare_object_model_3d(const Htuple ObjectModel3D, const Htuple Purpose, const Htuple OverwriteData, const Htuple GenParamName, const Htuple GenParamValue)

void PrepareObjectModel3d(const HTuple& ObjectModel3D, const HTuple& Purpose, const HTuple& OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue)

static void HObjectModel3D::PrepareObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Purpose, const HString& OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue)

void HObjectModel3D::PrepareObjectModel3d(const HString& Purpose, const HString& OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HObjectModel3D::PrepareObjectModel3d(const char* Purpose, const char* OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HObjectModel3D::PrepareObjectModel3d(const wchar_t* Purpose, const wchar_t* OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue) const   (Windows only)

static void HOperatorSet.PrepareObjectModel3d(HTuple objectModel3D, HTuple purpose, HTuple overwriteData, HTuple genParamName, HTuple genParamValue)

static void HObjectModel3D.PrepareObjectModel3d(HObjectModel3D[] objectModel3D, string purpose, string overwriteData, HTuple genParamName, HTuple genParamValue)

void HObjectModel3D.PrepareObjectModel3d(string purpose, string overwriteData, HTuple genParamName, HTuple genParamValue)

Description

The operator prepare_object_model_3dprepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3dPrepareObjectModel3d prepares the 3D object model ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D for a following operation given in PurposePurposePurposePurposepurpose. It computes values required for the operation and stores them in ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D, thus speeding up the following operation. It is not necessary to call prepare_object_model_3dprepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3dPrepareObjectModel3d. However, if the 3D object model is to be used multiple times for the same operation, it can be faster to do so.

The following values are possible for PurposePurposePurposePurposepurpose:

'shape_based_matching_3d'"shape_based_matching_3d""shape_based_matching_3d""shape_based_matching_3d""shape_based_matching_3d":

The 3D object model is prepared to be used in create_shape_model_3dcreate_shape_model_3dCreateShapeModel3dCreateShapeModel3dCreateShapeModel3d. For this, there are no generic parameters to set.

'segmentation'"segmentation""segmentation""segmentation""segmentation":

The 3D object model is prepared to be used in segment_object_model_3dsegment_object_model_3dSegmentObjectModel3dSegmentObjectModel3dSegmentObjectModel3d. For the preparation the 3D object model must have an attribute with the face triangles and an attribute with the 3D point coordinates.

If the 3D object model has no attribute with the face triangles, a simple triangulation is performed. For this, the 3D object model must have an attribute with the 3D point coordinates and an attribute with the mapping from the point coordinates to image coordinates. Only points originating from neighboring pixels are triangulated. Additionally, holes in the image region can be filled with a Delaunay triangulation (see 'max_area_holes'"max_area_holes""max_area_holes""max_area_holes""max_area_holes" below). Only holes which are completely surrounded by the image region are closed.

'distance_computation'"distance_computation""distance_computation""distance_computation""distance_computation":

The 3D object model is prepared to be used in distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d.

The parameter OverwriteDataOverwriteDataOverwriteDataOverwriteDataoverwriteData defines if the existing data of an already prepared 3D object model shall be removed. If OverwriteDataOverwriteDataOverwriteDataOverwriteDataoverwriteData is set to 'true'"true""true""true""true", the prepared data, defined with the parameter PurposePurposePurposePurposepurpose, is overwritten. If OverwriteDataOverwriteDataOverwriteDataOverwriteDataoverwriteData is set to 'false'"false""false""false""false", the prepared data is not overwritten. The parameter OverwriteDataOverwriteDataOverwriteDataOverwriteDataoverwriteData can be used for choosing another set of generic parameters GenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue. The parameter OverwriteDataOverwriteDataOverwriteDataOverwriteDataoverwriteData has no influence if the parameter PurposePurposePurposePurposepurpose is set to 'shape_based_matching_3d'"shape_based_matching_3d""shape_based_matching_3d""shape_based_matching_3d""shape_based_matching_3d", because for that, there are no generic parameters to set.

The generic parameters can optionally be used to influence the preparation. If desired, these parameters and their corresponding values can be specified by using GenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue, respectively. The following values for GenParamNameGenParamNameGenParamNameGenParamNamegenParamName are possible:

'max_area_holes'"max_area_holes""max_area_holes""max_area_holes""max_area_holes":

This parameter is only valid if PurposePurposePurposePurposepurpose is set to 'segmentation'"segmentation""segmentation""segmentation""segmentation". The parameter specifies which area holes of the point coordinates are closed during a simple Delaunay triangulation. Only holes which are completely surrounded by the image region are closed. If 'max_area_holes'"max_area_holes""max_area_holes""max_area_holes""max_area_holes" is set to 0, no holes are triangulated. If the parameter 'max_area_holes'"max_area_holes""max_area_holes""max_area_holes""max_area_holes" is set greater or equal than 1 pixel, the holes with an area less or equal than 'max_area_holes'"max_area_holes""max_area_holes""max_area_holes""max_area_holes" are closed by a meshing.

Suggested values: 1, 10, 100

Default value: 10

'distance_to'"distance_to""distance_to""distance_to""distance_to":

This parameter is only valid if PurposePurposePurposePurposepurpose is set to 'distance_computation'"distance_computation""distance_computation""distance_computation""distance_computation". The parameter specifies the type of data to which the distance shall be computed to. It is described in more detail in the documentation of distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d.

Possible values: 'auto'"auto""auto""auto""auto", 'triangles'"triangles""triangles""triangles""triangles", 'points'"points""points""points""points", 'primitive'"primitive""primitive""primitive""primitive"

Default value: 'auto'"auto""auto""auto""auto"

'method'"method""method""method""method":

This parameter is only valid if PurposePurposePurposePurposepurpose is set to 'distance_computation'"distance_computation""distance_computation""distance_computation""distance_computation". The parameter specifies the method to be used for the distance computation. It is described in more detail in the documentation of distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d.

Possible values: 'auto'"auto""auto""auto""auto", 'kd-tree'"kd-tree""kd-tree""kd-tree""kd-tree", 'voxel'"voxel""voxel""voxel""voxel", 'linear'"linear""linear""linear""linear"

Default value: 'auto'"auto""auto""auto""auto"

'max_distance'"max_distance""max_distance""max_distance""max_distance":

This parameter is only valid if PurposePurposePurposePurposepurpose is set to 'distance_computation'"distance_computation""distance_computation""distance_computation""distance_computation". The parameter specifies the maximum distance of interest for the distance computation. If it is set to 0, no maximum distance is used. It is described in more detail in the documentation of distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d.

Suggested values: 0, 0.1, 1, 10

Default value: 0

'sampling_dist_rel'"sampling_dist_rel""sampling_dist_rel""sampling_dist_rel""sampling_dist_rel":

This parameter is only valid if PurposePurposePurposePurposepurpose is set to 'distance_computation'"distance_computation""distance_computation""distance_computation""distance_computation". The parameter specifies the relative sampling distance when computing the distance to triangles with the method 'voxel'"voxel""voxel""voxel""voxel". It is described in more detail in the documentation of distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d.

Suggested values: 0.03, 0.01

Default value: 0.03

'sampling_dist_abs'"sampling_dist_abs""sampling_dist_abs""sampling_dist_abs""sampling_dist_abs":

This parameter is only valid if PurposePurposePurposePurposepurpose is set to 'distance_computation'"distance_computation""distance_computation""distance_computation""distance_computation". The parameter specifies the absolute sampling distance when computing the distance to triangles with the method 'voxel'"voxel""voxel""voxel""voxel". It is described in more detail in the documentation of distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d.

Suggested values: 1, 5, 10

Default value: None

Execution Information

Parameters

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D (input_control)  object_model_3d(-array) HObjectModel3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D object model.

PurposePurposePurposePurposepurpose (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Purpose of the 3D object model.

Default value: 'shape_based_matching_3d' "shape_based_matching_3d" "shape_based_matching_3d" "shape_based_matching_3d" "shape_based_matching_3d"

Suggested values: 'shape_based_matching_3d'"shape_based_matching_3d""shape_based_matching_3d""shape_based_matching_3d""shape_based_matching_3d", 'segmentation'"segmentation""segmentation""segmentation""segmentation", 'distance_computation'"distance_computation""distance_computation""distance_computation""distance_computation"

OverwriteDataOverwriteDataOverwriteDataOverwriteDataoverwriteData (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Specify if already existing data should be overwritten.

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

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

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name-array HTupleHTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Names of the generic parameters.

Default value: []

List of values: 'distance_to'"distance_to""distance_to""distance_to""distance_to", 'max_area_holes'"max_area_holes""max_area_holes""max_area_holes""max_area_holes", 'max_distance'"max_distance""max_distance""max_distance""max_distance", 'method'"method""method""method""method", 'sampling_dist_abs'"sampling_dist_abs""sampling_dist_abs""sampling_dist_abs""sampling_dist_abs", 'sampling_dist_rel'"sampling_dist_rel""sampling_dist_rel""sampling_dist_rel""sampling_dist_rel"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.value-array HTupleHTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Values of the generic parameters.

Default value: []

Suggested values: 0, 1, 100, 'auto'"auto""auto""auto""auto", 'triangles'"triangles""triangles""triangles""triangles", 'points'"points""points""points""points", 'primitive'"primitive""primitive""primitive""primitive", 'kd-tree'"kd-tree""kd-tree""kd-tree""kd-tree", 'voxel'"voxel""voxel""voxel""voxel", 'linear'"linear""linear""linear""linear", 0.01, 0.03

Result

The operator prepare_object_model_3dprepare_object_model_3dPrepareObjectModel3dPrepareObjectModel3dPrepareObjectModel3d returns the value 2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception will be raised.

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3d, xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3d

Possible Successors

create_shape_model_3dcreate_shape_model_3dCreateShapeModel3dCreateShapeModel3dCreateShapeModel3d, create_surface_modelcreate_surface_modelCreateSurfaceModelCreateSurfaceModelCreateSurfaceModel, distance_object_model_3ddistance_object_model_3dDistanceObjectModel3dDistanceObjectModel3dDistanceObjectModel3d, find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel, fit_primitives_object_model_3dfit_primitives_object_model_3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3d, refine_surface_model_poserefine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPoseRefineSurfaceModelPose, segment_object_model_3dsegment_object_model_3dSegmentObjectModel3dSegmentObjectModel3dSegmentObjectModel3d, simplify_object_model_3dsimplify_object_model_3dSimplifyObjectModel3dSimplifyObjectModel3dSimplifyObjectModel3d

Module

3D Metrology