本文整理汇总了C++中AAM_Shape::TransformPose方法的典型用法代码示例。如果您正苦于以下问题:C++ AAM_Shape::TransformPose方法的具体用法?C++ AAM_Shape::TransformPose怎么用?C++ AAM_Shape::TransformPose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AAM_Shape
的用法示例。
在下文中一共展示了AAM_Shape::TransformPose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AlignShape
void AAMBody::AlignShape(AAM_Shape& pStartShape, const AAM_Shape& pDetShape, const AAM_Shape& pMeanShape)
{
AAM_Shape baseShape, alignedShape;
baseShape.resize(2);
alignedShape.resize(2);
double meanCenter = (pMeanShape.MinY() + pMeanShape.MaxY()) * 0.5;
baseShape[0].x = pMeanShape.MinX();
baseShape[0].y = meanCenter;
baseShape[1].x = pMeanShape.MaxX();
baseShape[1].y = meanCenter;
double yMean = (pDetShape[1].y + pDetShape[0].y) * 0.5;
alignedShape[0].x = pDetShape[0].x;
alignedShape[0].y = yMean;
alignedShape[1].x = pDetShape[1].x;
alignedShape[1].y = yMean;
double a, b, tx, ty;
baseShape.AlignTransformation(alignedShape, a, b, tx, ty);
pStartShape = pMeanShape;
pStartShape.TransformPose(a, b, tx, ty);
}