1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #10839 from csukuangfj:fix-9486

This commit is contained in:
Alexander Alekhin
2018-02-12 09:24:28 +00:00
+4
View File
@@ -286,6 +286,10 @@ cv::Affine3d cv::viz::Widget3D::getPose() const
{
vtkProp3D *actor = vtkProp3D::SafeDownCast(WidgetAccessor::getProp(*this));
CV_Assert("Widget is not 3D." && actor);
if (!actor->GetUserMatrix())
{
return Affine3d(); // empty user matrix, return an identity transform.
}
return Affine3d(*actor->GetUserMatrix()->Element);
}