ClassesClasses | | Operators

pose_averageT_pose_averagePoseAveragePoseAverage (Operator)

Name

pose_averageT_pose_averagePoseAveragePoseAverage — Compute the average of a set of poses.

Signature

pose_average( : : Poses, Weights, Mode, SigmaT, SigmaR : AveragePose, Quality)

Herror T_pose_average(const Htuple Poses, const Htuple Weights, const Htuple Mode, const Htuple SigmaT, const Htuple SigmaR, Htuple* AveragePose, Htuple* Quality)

void PoseAverage(const HTuple& Poses, const HTuple& Weights, const HTuple& Mode, const HTuple& SigmaT, const HTuple& SigmaR, HTuple* AveragePose, HTuple* Quality)

static HPose HPose::PoseAverage(const HPoseArray& Poses, const HTuple& Weights, const HString& Mode, const HTuple& SigmaT, const HTuple& SigmaR, HTuple* Quality)

static HPose HPose::PoseAverage(const HPoseArray& Poses, const HTuple& Weights, const HString& Mode, double SigmaT, double SigmaR, HTuple* Quality)

static HPose HPose::PoseAverage(const HPoseArray& Poses, const HTuple& Weights, const char* Mode, double SigmaT, double SigmaR, HTuple* Quality)

static void HOperatorSet.PoseAverage(HTuple poses, HTuple weights, HTuple mode, HTuple sigmaT, HTuple sigmaR, out HTuple averagePose, out HTuple quality)

static HPose HPose.PoseAverage(HPose[] poses, HTuple weights, string mode, HTuple sigmaT, HTuple sigmaR, out HTuple quality)

static HPose HPose.PoseAverage(HPose[] poses, HTuple weights, string mode, double sigmaT, double sigmaR, out HTuple quality)

Description

pose_averagepose_averagePoseAveragePoseAveragePoseAverage computes the average rotation and translation of the poses passed in PosesPosesPosesPosesposes, and returns this average pose in AveragePoseAveragePoseAveragePoseAveragePoseaveragePose. The poses can be weighted using the parameter WeightsWeightsWeightsWeightsweights. If an empty tuple is passed as weight, all poses have the same influence on the result. Otherwise, a tuple that contains one positive weight per pose needs to be passed. A higher weight leads to a higher influence of that pose on the average.

pose_averagepose_averagePoseAveragePoseAveragePoseAverage supports two modes for averaging the poses, which can be selected with the parameter ModeModeModeModemode. 'direct'"direct""direct""direct""direct" selects a direct computation of the average, where the translation and rotation are averaged independently from each other. 'iterative'"iterative""iterative""iterative""iterative" uses the average pose computed by the 'direct'"direct""direct""direct""direct" method as initial value for an iterative method, which computes the local mode of the poses. The iterative method is slower than the direct method. However, it returns more accurate poses especially in the presence of outlier poses, as such outliers are downweighted automatically.

For the iterative method, the relative weight of the translation and the rotation can be set with the parameters SigmaTSigmaTSigmaTSigmaTsigmaT and SigmaRSigmaRSigmaRSigmaRsigmaR, respectively. Both values can be set to 'auto'"auto""auto""auto""auto", in which case they are automatically estimated. In this case, SigmaTSigmaTSigmaTSigmaTsigmaT is set to the spread of the translations of the poses, and SigmaRSigmaRSigmaRSigmaRsigmaR is set to a constant value. Both values describe the expected spread of the translation and the rotation, and influence the weighting of the poses. For the direct method, both parameters are ignored.

A measure of the quality of the computed pose is returned in QualityQualityQualityQualityquality. QualityQualityQualityQualityquality contains a tuple with four elements, which describe the average and maximum deviation of the passed poses from the returned average pose AveragePoseAveragePoseAveragePoseAveragePoseaveragePose. The order of the values is: Root-Mean-Square error of the translation, Root-Mean-Square error of the rotation, maximum translation and maximum rotation deviation. The weights passed in WeightsWeightsWeightsWeightsweights are used in the Root-Mean-Square errors of translation and rotation, but not for the last two quality measures.

Execution Information

Parameters

PosesPosesPosesPosesposes (input_control)  pose-array HPose, HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Set of poses of which the average if computed.

WeightsWeightsWeightsWeightsweights (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Empty tuple, or one weight per pose.

Default value: []

Restriction: Weights > 0 && length(Weights) == 0 || length(Weights) == length(Poses) / 7

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

Averaging mode.

Default value: 'iterative' "iterative" "iterative" "iterative" "iterative"

List of values: 'direct'"direct""direct""direct""direct", 'iterative'"iterative""iterative""iterative""iterative"

SigmaTSigmaTSigmaTSigmaTsigmaT (input_control)  number HTupleHTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Weight of the translation.

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

Suggested values: 'auto'"auto""auto""auto""auto", 0.1, 1, 100

SigmaRSigmaRSigmaRSigmaRsigmaR (input_control)  number HTupleHTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Weight of the rotation.

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

Suggested values: 'auto'"auto""auto""auto""auto", 0.1, 1, 10

AveragePoseAveragePoseAveragePoseAveragePoseaveragePose (output_control)  pose HPose, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Weighted mean of the poses.

QualityQualityQualityQualityquality (output_control)  number-array HTupleHTupleHtuple (real) (double) (double) (double)

Deviation of the mean from the input poses.

Assertion: length(Quality) == 4

Result

If the parameters are valid, the operator pose_averagepose_averagePoseAveragePoseAveragePoseAverage returns 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

read_poseread_poseReadPoseReadPoseReadPose, hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPose

See also

read_poseread_poseReadPoseReadPoseReadPose, hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPose, pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dPoseToHomMat3d

Module

Foundation


ClassesClasses | | Operators