ClassesClassesClassesClasses | | | | Operators

smooth_object_model_3dsmooth_object_model_3dSmoothObjectModel3dsmooth_object_model_3dSmoothObjectModel3dSmoothObjectModel3d (Operator)

Name

smooth_object_model_3dsmooth_object_model_3dSmoothObjectModel3dsmooth_object_model_3dSmoothObjectModel3dSmoothObjectModel3d — Smooth the 3D points of a 3D object model.

Signature

smooth_object_model_3d( : : ObjectModel3D, Method, GenParamName, GenParamValue : SmoothObjectModel3D)

Herror smooth_object_model_3d(const Hlong ObjectModel3D, const char* Method, const char* GenParamName, double GenParamValue, Hlong* SmoothObjectModel3D)

Herror T_smooth_object_model_3d(const Htuple ObjectModel3D, const Htuple Method, const Htuple GenParamName, const Htuple GenParamValue, Htuple* SmoothObjectModel3D)

Herror smooth_object_model_3d(const HTuple& ObjectModel3D, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, Hlong* SmoothObjectModel3D)

Herror smooth_object_model_3d(const HTuple& ObjectModel3D, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SmoothObjectModel3D)

HTuple HObjectModel3D::SmoothObjectModel3d(const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue) const

void SmoothObjectModel3d(const HTuple& ObjectModel3D, const HTuple& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SmoothObjectModel3D)

static HObjectModel3DArray HObjectModel3D::SmoothObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue)

HObjectModel3D HObjectModel3D::SmoothObjectModel3d(const HString& Method, const HString& GenParamName, double GenParamValue) const

HObjectModel3D HObjectModel3D::SmoothObjectModel3d(const char* Method, const char* GenParamName, double GenParamValue) const

void HOperatorSetX.SmoothObjectModel3d(
[in] VARIANT ObjectModel3D, [in] VARIANT Method, [in] VARIANT GenParamName, [in] VARIANT GenParamValue, [out] VARIANT* SmoothObjectModel3D)

IHObjectModel3DX* HObjectModel3DX.SmoothObjectModel3d(
[in] BSTR Method, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

static void HOperatorSet.SmoothObjectModel3d(HTuple objectModel3D, HTuple method, HTuple genParamName, HTuple genParamValue, out HTuple smoothObjectModel3D)

static HObjectModel3D[] HObjectModel3D.SmoothObjectModel3d(HObjectModel3D[] objectModel3D, string method, HTuple genParamName, HTuple genParamValue)

HObjectModel3D HObjectModel3D.SmoothObjectModel3d(string method, string genParamName, double genParamValue)

Description

The operator smooth_object_model_3dsmooth_object_model_3dSmoothObjectModel3dsmooth_object_model_3dSmoothObjectModel3dSmoothObjectModel3d smoothes the 3D points in ObjectModel3DObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D using the method specified by MethodMethodMethodMethodMethodmethod. The resulting smoothed points are returned in SmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DsmoothObjectModel3D. Currently, Moving Least Squares (MLS) (MethodMethodMethodMethodMethodmethod='mls'"mls""mls""mls""mls""mls") is the only smoothing method that is supported.

For each point P, the MLS smoothing algorithm fits a planar surface or a higher order polynomial surface to its k-neighborhood (the k nearest points). The surface fitting is essentially a standard weighted least squares parameter estimation of the plane or polynomial surface parameters, respectively. The closest neighbors of P have higher contribution than the other points, which is controlled by the following weighting function with a parameter sigma:

                    /    || P' - P ||^2 \
        w(P') = exp | -  -------------- |
                    \       sigma^2     /

The point is then projected on the surface. This process is repeated for all points resulting in a smoothed point set. The fitted surfaces have well defined normals (i.e., they can easily be computed from the surface parameters). Therefore, the points are augmented by the corresponding normals as side effect of the smoothing.

By setting GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName to one of the following values, additional MLS specific parameters can be set with GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue:

'mls_kNN'"mls_kNN""mls_kNN""mls_kNN""mls_kNN""mls_kNN":

Specify the number of nearest neighbors k that are used to fit the MLS surface to each point.

Suggested values: 40, 60 (default), 80, 100, 400

'mls_order'"mls_order""mls_order""mls_order""mls_order""mls_order":

Specify the order of the MLS polynomial surface. For 'mls_order'"mls_order""mls_order""mls_order""mls_order""mls_order"=1 the surface is a plane.

Suggested values: 1, 2 (default), 3

'mls_abs_sigma'"mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma":

Specify the weighting parameter sigma as a fixed absolute value in meter. The value to be selected depends on the scale of the point data. As a rule of thumb, sigma can be selected to be the typical distance between a point P and its k/2-th neighbor P_median. Note that setting an absolute weighting parameter for point data with varying density might result in different smoothing results for points that are situated in parts of the point data with different densities. This problem can be avoided by using 'mls_relative_sigma'"mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma" instead that is scale independent, which makes it also a more convenient way to specify the neighborhood weighting. Note that if 'mls_abs_sigma'"mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma" is passed, any value set in 'mls_relative_sigma'"mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma" is ignored.

Suggested values: 0.0001, 0.001, 0.01, 0.1, 1.0

'mls_relative_sigma'"mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma":

Specify a multiplication factor rel_sigma that is used to compute sigma_P for a point P by the formula:

        sigma_P = rel_sigma*|| P_median - P ||, 
    

where P_median is the k/2-th neighbor of P. Note that, unlike sigma, which is a global parameter for all points, sigma_P is computed for each point P and therefore adapts the weighting function to its neighborhood. This avoids problems that might appear while trying to set a global parameter sigma ('mls_abs_sigma'"mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma") to a point data with highly varying point density. Note however that if 'mls_abs_sigma'"mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma" is set, 'mls_relative_sigma'"mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma" is ignored.

Suggested values: 0.1, 0.5, 1.0 (default), 1.5, 2.0

'mls_force_inwards'"mls_force_inwards""mls_force_inwards""mls_force_inwards""mls_force_inwards""mls_force_inwards":

If this parameter is set to 'true'"true""true""true""true""true", all surface normals are oriented such that they point “in the direction of the origin”. Expressed mathematically, it is ensured that the scalar product between the normal vector and the vector from the respective surface point to the origin is positive. This may be necessary if the resulting SmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DsmoothObjectModel3D is used for surface-based matching, either as model in create_surface_modelcreate_surface_modelCreateSurfaceModelcreate_surface_modelCreateSurfaceModelCreateSurfaceModel or as 3D scene in find_surface_model, because here, the consistent orientation of the normals is important for the matching process. If 'mls_force_inwards'"mls_force_inwards""mls_force_inwards""mls_force_inwards""mls_force_inwards""mls_force_inwards" is set to 'false'"false""false""false""false""false", the normal vectors are oriented arbitrarily.

Possible values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false" (default)

Note that if a 3D object model is no longer needed or should be overwritten, the memory has to be freed first by calling the operator clear_object_model_3dclear_object_model_3dClearObjectModel3dclear_object_model_3dClearObjectModel3dClearObjectModel3d.

Parallelization

Parameters

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D (input_control)  object_model_3d(-array) HObjectModel3D, HTupleHTupleHObjectModel3D, HTupleHObjectModel3DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the 3D object model containing 3D point data.

MethodMethodMethodMethodMethodmethod (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Smoothing method.

Default value: 'mls' "mls" "mls" "mls" "mls" "mls"

List of values: 'mls'"mls""mls""mls""mls""mls"

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

Names of generic smoothing parameters.

Default value: []

List of values: 'mls_abs_sigma'"mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma""mls_abs_sigma", 'mls_force_inwards'"mls_force_inwards""mls_force_inwards""mls_force_inwards""mls_force_inwards""mls_force_inwards", 'mls_kNN'"mls_kNN""mls_kNN""mls_kNN""mls_kNN""mls_kNN", 'mls_order'"mls_order""mls_order""mls_order""mls_order""mls_order", 'mls_relative_sigma'"mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma""mls_relative_sigma"

GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (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 generic smoothing parameters.

Default value: []

Suggested values: 10, 20, 40, 60, 0.1, 0.5, 1.0, 2.0, 0, 1, 2

SmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DSmoothObjectModel3DsmoothObjectModel3D (output_control)  object_model_3d(-array) HObjectModel3D, HTupleHTupleHObjectModel3D, HTupleHObjectModel3DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the 3D object model with the smoothed 3D point data.

Possible Successors

clear_object_model_3dclear_object_model_3dClearObjectModel3dclear_object_model_3dClearObjectModel3dClearObjectModel3d

Alternatives

surface_normals_object_model_3dsurface_normals_object_model_3dSurfaceNormalsObjectModel3dsurface_normals_object_model_3dSurfaceNormalsObjectModel3dSurfaceNormalsObjectModel3d

Module

3D Metrology


ClassesClassesClassesClasses | | | | Operators