mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
fix issue #9486.
This commit is contained in:
parent
e2a99d24ec
commit
ce2a65db85
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user