We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a99d2 commit ce2a65dCopy full SHA for ce2a65d
modules/viz/src/widget.cpp
@@ -284,6 +284,10 @@ cv::Affine3d cv::viz::Widget3D::getPose() const
284
{
285
vtkProp3D *actor = vtkProp3D::SafeDownCast(WidgetAccessor::getProp(*this));
286
CV_Assert("Widget is not 3D." && actor);
287
+ if (!actor->GetUserMatrix())
288
+ {
289
+ return Affine3d(); // empty user matrix, return an identity transform.
290
+ }
291
return Affine3d(*actor->GetUserMatrix()->Element);
292
}
293
0 commit comments