Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f6e9b811
Commit
f6e9b811
authored
Dec 01, 2013
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reduced exported interface names (to make IntelliSense hints less littered)
parent
44c1d4df
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
57 deletions
+3
-57
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+0
-29
cloud_widgets.cpp
modules/viz/src/cloud_widgets.cpp
+0
-0
shape_widgets.cpp
modules/viz/src/shape_widgets.cpp
+0
-0
widget.cpp
modules/viz/src/widget.cpp
+3
-28
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
f6e9b811
...
...
@@ -119,8 +119,6 @@ namespace cv
Affine3f
getPose
()
const
;
void
setColor
(
const
Color
&
color
);
private
:
struct
MatrixConverter
;
};
...
...
@@ -145,8 +143,6 @@ namespace cv
public
:
WPlane
(
const
Vec4f
&
coefs
,
float
size
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WPlane
(
const
Vec4f
&
coefs
,
const
Point3f
&
pt
,
float
size
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
SetSizeImpl
;
};
class
CV_EXPORTS
WSphere
:
public
Widget3D
...
...
@@ -189,9 +185,6 @@ namespace cv
{
public
:
WPolyLine
(
InputArray
points
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
CopyImpl
;
};
class
CV_EXPORTS
WGrid
:
public
Widget3D
...
...
@@ -201,10 +194,6 @@ namespace cv
WGrid
(
const
Vec2i
&
dimensions
,
const
Vec2d
&
spacing
,
const
Color
&
color
=
Color
::
white
());
//! Creates grid based on the plane equation
WGrid
(
const
Vec4f
&
coeffs
,
const
Vec2i
&
dimensions
,
const
Vec2d
&
spacing
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
GridImpl
;
};
class
CV_EXPORTS
WText3D
:
public
Widget3D
...
...
@@ -257,9 +246,6 @@ namespace cv
WCameraPosition
(
const
Matx33f
&
K
,
const
Mat
&
img
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
//! Creates frustum and display given image at the far plane
WCameraPosition
(
const
Vec2f
&
fov
,
const
Mat
&
img
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
ProjectImage
;
};
class
CV_EXPORTS
WTrajectory
:
public
Widget3D
...
...
@@ -273,9 +259,6 @@ namespace cv
WTrajectory
(
const
std
::
vector
<
Affine3f
>
&
path
,
const
Matx33f
&
K
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
//! Displays trajectory of the given path by frustums
WTrajectory
(
const
std
::
vector
<
Affine3f
>
&
path
,
const
Vec2f
&
fov
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
ApplyPath
;
};
class
CV_EXPORTS
WSpheresTrajectory
:
public
Widget3D
...
...
@@ -292,9 +275,6 @@ namespace cv
WCloud
(
InputArray
cloud
,
InputArray
colors
);
//! All points in cloud have the same color
WCloud
(
InputArray
cloud
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
CreateCloudWidget
;
};
class
CV_EXPORTS
WCloudCollection
:
public
Widget3D
...
...
@@ -306,27 +286,18 @@ namespace cv
void
addCloud
(
InputArray
cloud
,
InputArray
colors
,
const
Affine3f
&
pose
=
Affine3f
::
Identity
());
//! All points in cloud have the same color
void
addCloud
(
InputArray
cloud
,
const
Color
&
color
=
Color
::
white
(),
const
Affine3f
&
pose
=
Affine3f
::
Identity
());
private
:
struct
CreateCloudWidget
;
};
class
CV_EXPORTS
WCloudNormals
:
public
Widget3D
{
public
:
WCloudNormals
(
InputArray
cloud
,
InputArray
normals
,
int
level
=
100
,
float
scale
=
0.02
f
,
const
Color
&
color
=
Color
::
white
());
private
:
struct
ApplyCloudNormals
;
};
class
CV_EXPORTS
WMesh
:
public
Widget3D
{
public
:
WMesh
(
const
Mesh3d
&
mesh
);
private
:
struct
CopyImpl
;
};
template
<>
CV_EXPORTS
Widget2D
Widget
::
cast
<
Widget2D
>
();
...
...
modules/viz/src/cloud_widgets.cpp
View file @
f6e9b811
This diff is collapsed.
Click to expand it.
modules/viz/src/shape_widgets.cpp
View file @
f6e9b811
This diff is collapsed.
Click to expand it.
modules/viz/src/widget.cpp
View file @
f6e9b811
...
...
@@ -303,27 +303,6 @@ void cv::viz::WidgetAccessor::setProp(Widget& widget, vtkSmartPointer<vtkProp> p
///////////////////////////////////////////////////////////////////////////////////////////////
/// widget3D implementation
struct
cv
::
viz
::
Widget3D
::
MatrixConverter
{
static
Matx44f
convertToMatx
(
const
vtkSmartPointer
<
vtkMatrix4x4
>&
vtk_matrix
)
{
Matx44f
m
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
k
=
0
;
k
<
4
;
k
++
)
m
(
i
,
k
)
=
vtk_matrix
->
GetElement
(
i
,
k
);
return
m
;
}
static
vtkSmartPointer
<
vtkMatrix4x4
>
convertToVtkMatrix
(
const
Matx44f
&
m
)
{
vtkSmartPointer
<
vtkMatrix4x4
>
vtk_matrix
=
vtkSmartPointer
<
vtkMatrix4x4
>::
New
();
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
k
=
0
;
k
<
4
;
k
++
)
vtk_matrix
->
SetElement
(
i
,
k
,
m
(
i
,
k
));
return
vtk_matrix
;
}
};
void
cv
::
viz
::
Widget3D
::
setPose
(
const
Affine3f
&
pose
)
{
vtkProp3D
*
actor
=
vtkProp3D
::
SafeDownCast
(
WidgetAccessor
::
getProp
(
*
this
));
...
...
@@ -345,10 +324,9 @@ void cv::viz::Widget3D::updatePose(const Affine3f &pose)
setPose
(
pose
);
return
;
}
Matx44f
matrix_cv
=
MatrixConverter
::
convertToMatx
(
matrix
);
Affine3f
updated_pose
=
pose
*
Affine3f
(
matrix_cv
);
matrix
=
MatrixConverter
::
convertToVtkMatrix
(
updated_pose
.
matrix
);
Affine3f
updated_pose
=
pose
*
Affine3f
(
convertToMatx
(
matrix
)
);
matrix
=
convertToVtkMatrix
(
updated_pose
.
matrix
);
actor
->
SetUserMatrix
(
matrix
);
actor
->
Modified
();
...
...
@@ -358,10 +336,7 @@ cv::Affine3f cv::viz::Widget3D::getPose() const
{
vtkProp3D
*
actor
=
vtkProp3D
::
SafeDownCast
(
WidgetAccessor
::
getProp
(
*
this
));
CV_Assert
(
"Widget is not 3D."
&&
actor
);
vtkSmartPointer
<
vtkMatrix4x4
>
matrix
=
actor
->
GetUserMatrix
();
Matx44f
matrix_cv
=
MatrixConverter
::
convertToMatx
(
matrix
);
return
Affine3f
(
matrix_cv
);
return
Affine3f
(
convertToMatx
(
actor
->
GetUserMatrix
()));
}
void
cv
::
viz
::
Widget3D
::
setColor
(
const
Color
&
color
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment