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
54fa69ca
Commit
54fa69ca
authored
Dec 08, 2013
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed Spheres Trajectory, minor changes in Trajectory
parent
c7ff1387
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
25 deletions
+25
-25
widget.rst
modules/viz/doc/widget.rst
+14
-14
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+6
-6
shape_widgets.cpp
modules/viz/src/shape_widgets.cpp
+5
-5
No files found.
modules/viz/doc/widget.rst
View file @
54fa69ca
...
...
@@ -729,10 +729,10 @@ This 3D Widget represents a trajectory. ::
class CV_EXPORTS WTrajectory : public Widget3D
{
public:
enum {
DISPLAY_FRAMES = 1, DISPLAY_PATH = 2
};
enum {
FRAMES = 1, PATH = 2, BOTH = FRAMES + PATH
};
//! Displays trajectory of the given path either by coordinate frames or polyline
WTrajectory(const std::vector<Affine3f> &path, int display_mode = WTrajectory::
DISPLAY_
PATH, const Color &color = Color::white(), float scale = 1.0);
WTrajectory(const std::vector<Affine3f> &path, int display_mode = WTrajectory::PATH, const Color &color = Color::white(), float scale = 1.0);
//! Displays trajectory of the given path by frustums
WTrajectory(const std::vector<Affine3f> &path, const Matx33f &K, float scale = 1.0, const Color &color = Color::white());
//! Displays trajectory of the given path by frustums
...
...
@@ -746,18 +746,18 @@ viz::WTrajectory::WTrajectory
-----------------------------
Constructs a WTrajectory.
.. ocv:function:: WTrajectory(const std::vector<Affine3f> &path, int display_mode = WTrajectory::
DISPLAY_
PATH, const Color &color = Color::white(), float scale = 1.0)
.. ocv:function:: WTrajectory(const std::vector<Affine3f> &path, int display_mode = WTrajectory::PATH, const Color &color = Color::white(), float scale = 1.0)
:param path: List of poses on a trajectory.
:param display_mode: Display mode. This can be
DISPLAY_PATH, DISPLAY_FRAMES, DISPLAY_PATH & DISPLAY_FRAMES
.
:param display_mode: Display mode. This can be
PATH, FRAMES, and BOTH
.
:param color: :ocv:class:`Color` of the polyline that represents path. Frames are not affected.
:param scale: Scale of the frames. Polyline is not affected.
Displays trajectory of the given path as follows:
*
DISPLAY_
PATH : Displays a poly line that represents the path.
*
DISPLAY_
FRAMES : Displays coordinate frames at each pose.
*
DISPLAY_PATH & DISPLAY_
FRAMES : Displays both poly line and coordinate frames.
* PATH : Displays a poly line that represents the path.
* FRAMES : Displays coordinate frames at each pose.
*
PATH &
FRAMES : Displays both poly line and coordinate frames.
.. ocv:function:: WTrajectory(const std::vector<Affine3f> &path, const Matx33f &K, float scale = 1.0, const Color &color = Color::white())
...
...
@@ -777,26 +777,26 @@ Constructs a WTrajectory.
Displays frustums at each pose of the trajectory.
viz::W
SpheresTrajectory
viz::W
TrajectorySpheres
-----------------------
.. ocv:class:: W
SpheresTrajectory
.. ocv:class:: W
TrajectorySpheres
This 3D Widget represents a trajectory using spheres and lines, where spheres represent the positions of the camera, and lines
represent the direction from previous position to the current. ::
class CV_EXPORTS W
SpheresTrajectory
: public Widget3D
class CV_EXPORTS W
TrajectorySpheres
: public Widget3D
{
public:
W
SpheresTrajectory
(const std::vector<Affine3f> &path, float line_length = 0.05f,
W
TrajectorySpheres
(const std::vector<Affine3f> &path, float line_length = 0.05f,
float init_sphere_radius = 0.021, sphere_radius = 0.007,
Color &line_color = Color::white(), const Color &sphere_color = Color::white());
};
viz::W
SpheresTrajectory::WSpheresTrajectory
viz::W
TrajectorySpheres::WTrajectorySpheres
-------------------------------------------
Constructs a W
SpheresTrajectory
.
Constructs a W
TrajectorySpheres
.
.. ocv:function:: W
SpheresTrajectory
(const std::vector<Affine3f> &path, float line_length = 0.05f, float init_sphere_radius = 0.021, float sphere_radius = 0.007, const Color &line_color = Color::white(), const Color &sphere_color = Color::white())
.. ocv:function:: W
TrajectorySpheres
(const std::vector<Affine3f> &path, float line_length = 0.05f, float init_sphere_radius = 0.021, float sphere_radius = 0.007, const Color &line_color = Color::white(), const Color &sphere_color = Color::white())
:param path: List of poses on a trajectory.
:param line_length: Length of the lines.
...
...
modules/viz/include/opencv2/viz/widgets.hpp
View file @
54fa69ca
...
...
@@ -257,21 +257,21 @@ namespace cv
class
CV_EXPORTS
WTrajectory
:
public
Widget3D
{
public
:
enum
{
DISPLAY_FRAMES
=
1
,
DISPLAY_PATH
=
2
};
enum
{
FRAMES
=
1
,
PATH
=
2
,
BOTH
=
FRAMES
+
PATH
};
//! Displays trajectory of the given path either by coordinate frames or polyline
WTrajectory
(
const
std
::
vector
<
Affine3f
>
&
path
,
int
display_mode
=
WTrajectory
::
DISPLAY_
PATH
,
const
Color
&
color
=
Color
::
white
(),
float
scale
=
1.
f
);
WTrajectory
(
const
std
::
vector
<
Affine3f
>
&
path
,
int
display_mode
=
WTrajectory
::
PATH
,
const
Color
&
color
=
Color
::
white
(),
float
scale
=
1.
f
);
//! Displays trajectory of the given path by frustums
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
());
};
class
CV_EXPORTS
W
SpheresTrajectory
:
public
Widget3D
class
CV_EXPORTS
W
TrajectorySpheres
:
public
Widget3D
{
public
:
W
SpheresTrajectory
(
const
std
::
vector
<
Affine3f
>
&
path
,
float
line_length
=
0.05
f
,
float
init_sphere_radius
=
0.021
f
,
float
sphere_radius
=
0.007
f
,
const
Color
&
line_color
=
Color
::
white
(),
const
Color
&
sphere_color
=
Color
::
white
());
W
TrajectorySpheres
(
const
std
::
vector
<
Affine3f
>
&
path
,
float
line_length
=
0.05
f
,
float
init_sphere_radius
=
0.021
f
,
float
sphere_radius
=
0.007
f
,
const
Color
&
line_color
=
Color
::
white
(),
const
Color
&
sphere_color
=
Color
::
white
());
};
/////////////////////////////////////////////////////////////////////////////
...
...
@@ -330,7 +330,7 @@ namespace cv
template
<>
CV_EXPORTS
WImage3D
Widget
::
cast
<
WImage3D
>
();
template
<>
CV_EXPORTS
WCameraPosition
Widget
::
cast
<
WCameraPosition
>
();
template
<>
CV_EXPORTS
WTrajectory
Widget
::
cast
<
WTrajectory
>
();
template
<>
CV_EXPORTS
W
SpheresTrajectory
Widget
::
cast
<
WSpheresTrajectory
>
();
template
<>
CV_EXPORTS
W
TrajectorySpheres
Widget
::
cast
<
WTrajectorySpheres
>
();
template
<>
CV_EXPORTS
WCloud
Widget
::
cast
<
WCloud
>
();
template
<>
CV_EXPORTS
WCloudCollection
Widget
::
cast
<
WCloudCollection
>
();
template
<>
CV_EXPORTS
WCloudNormals
Widget
::
cast
<
WCloudNormals
>
();
...
...
modules/viz/src/shape_widgets.cpp
View file @
54fa69ca
...
...
@@ -1240,7 +1240,7 @@ cv::viz::WTrajectory::WTrajectory(const std::vector<Affine3f> &path, int display
vtkSmartPointer
<
vtkAppendPolyData
>
appendFilter
=
vtkSmartPointer
<
vtkAppendPolyData
>::
New
();
// Bitwise and with 3 in order to limit the domain to 2 bits
if
((
~
display_mode
&
3
)
^
WTrajectory
::
DISPLAY_
PATH
)
if
((
~
display_mode
&
3
)
^
WTrajectory
::
PATH
)
{
// Create a poly line along the path
vtkIdType
nr_points
=
path
.
size
();
...
...
@@ -1284,7 +1284,7 @@ cv::viz::WTrajectory::WTrajectory(const std::vector<Affine3f> &path, int display
#endif
}
if
((
~
display_mode
&
3
)
^
WTrajectory
::
DISPLAY_
FRAMES
)
if
((
~
display_mode
&
3
)
^
WTrajectory
::
FRAMES
)
{
// Create frames and transform along the path
vtkSmartPointer
<
vtkAxes
>
axes
=
vtkSmartPointer
<
vtkAxes
>::
New
();
...
...
@@ -1424,7 +1424,7 @@ template<> cv::viz::WTrajectory cv::viz::Widget::cast<cv::viz::WTrajectory>()
///////////////////////////////////////////////////////////////////////////////////////////////
/// spheres trajectory widget implementation
cv
::
viz
::
W
SpheresTrajectory
::
WSpheresTrajectory
(
const
std
::
vector
<
Affine3f
>
&
path
,
float
line_length
,
float
init_sphere_radius
,
float
sphere_radius
,
cv
::
viz
::
W
TrajectorySpheres
::
WTrajectorySpheres
(
const
std
::
vector
<
Affine3f
>
&
path
,
float
line_length
,
float
init_sphere_radius
,
float
sphere_radius
,
const
Color
&
line_color
,
const
Color
&
sphere_color
)
{
vtkSmartPointer
<
vtkAppendPolyData
>
appendFilter
=
vtkSmartPointer
<
vtkAppendPolyData
>::
New
();
...
...
@@ -1505,8 +1505,8 @@ cv::viz::WSpheresTrajectory::WSpheresTrajectory(const std::vector<Affine3f> &pat
WidgetAccessor
::
setProp
(
*
this
,
actor
);
}
template
<>
cv
::
viz
::
W
SpheresTrajectory
cv
::
viz
::
Widget
::
cast
<
cv
::
viz
::
WSpheresTrajectory
>
()
template
<>
cv
::
viz
::
W
TrajectorySpheres
cv
::
viz
::
Widget
::
cast
<
cv
::
viz
::
WTrajectorySpheres
>
()
{
Widget3D
widget
=
this
->
cast
<
Widget3D
>
();
return
static_cast
<
W
SpheresTrajectory
&>
(
widget
);
return
static_cast
<
W
TrajectorySpheres
&>
(
widget
);
}
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