Commit ce2a65db authored by Fangjun Kuang's avatar Fangjun Kuang

fix issue #9486.

parent e2a99d24
......@@ -284,6 +284,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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment