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.
2 parents b7ad95b + ce2a65d commit ab0f0f2Copy full SHA for ab0f0f2
modules/viz/src/widget.cpp
@@ -286,6 +286,10 @@ cv::Affine3d cv::viz::Widget3D::getPose() const
286
{
287
vtkProp3D *actor = vtkProp3D::SafeDownCast(WidgetAccessor::getProp(*this));
288
CV_Assert("Widget is not 3D." && actor);
289
+ if (!actor->GetUserMatrix())
290
+ {
291
+ return Affine3d(); // empty user matrix, return an identity transform.
292
+ }
293
return Affine3d(*actor->GetUserMatrix()->Element);
294
}
295
0 commit comments