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
56819eaf
Commit
56819eaf
authored
Jan 07, 2014
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switched completer API to doubles, updated docs
parent
d2644654
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
24 deletions
+24
-24
widget.rst
modules/viz/doc/widget.rst
+0
-0
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+22
-22
clouds.cpp
modules/viz/src/clouds.cpp
+2
-2
shapes.cpp
modules/viz/src/shapes.cpp
+0
-0
No files found.
modules/viz/doc/widget.rst
View file @
56819eaf
This diff is collapsed.
Click to expand it.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
56819eaf
...
...
@@ -135,44 +135,44 @@ namespace cv
class
CV_EXPORTS
WLine
:
public
Widget3D
{
public
:
WLine
(
const
Point3
f
&
pt1
,
const
Point3f
&
pt2
,
const
Color
&
color
=
Color
::
white
());
WLine
(
const
Point3
d
&
pt1
,
const
Point3d
&
pt2
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WPlane
:
public
Widget3D
{
public
:
WPlane
(
const
Vec4
f
&
coefs
,
float
size
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WPlane
(
const
Vec4
f
&
coefs
,
const
Point3f
&
pt
,
float
size
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WPlane
(
const
Vec4
d
&
coefs
,
double
size
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WPlane
(
const
Vec4
d
&
coefs
,
const
Point3d
&
pt
,
double
size
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WSphere
:
public
Widget3D
{
public
:
WSphere
(
const
cv
::
Point3
f
&
center
,
float
radius
,
int
sphere_resolution
=
10
,
const
Color
&
color
=
Color
::
white
());
WSphere
(
const
cv
::
Point3
d
&
center
,
double
radius
,
int
sphere_resolution
=
10
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WArrow
:
public
Widget3D
{
public
:
WArrow
(
const
Point3
f
&
pt1
,
const
Point3f
&
pt2
,
float
thickness
=
0.03
f
,
const
Color
&
color
=
Color
::
white
());
WArrow
(
const
Point3
d
&
pt1
,
const
Point3d
&
pt2
,
double
thickness
=
0.03
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WCircle
:
public
Widget3D
{
public
:
WCircle
(
const
Point3
f
&
pt
,
float
radius
,
float
thickness
=
0.01
f
,
const
Color
&
color
=
Color
::
white
());
WCircle
(
const
Point3
d
&
pt
,
double
radius
,
double
thickness
=
0.01
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WCylinder
:
public
Widget3D
{
public
:
WCylinder
(
const
Point3
f
&
pt_on_axis
,
const
Point3f
&
axis_direction
,
float
radius
,
int
numsides
=
30
,
const
Color
&
color
=
Color
::
white
());
WCylinder
(
const
Point3
d
&
pt_on_axis
,
const
Point3d
&
axis_direction
,
double
radius
,
int
numsides
=
30
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WCube
:
public
Widget3D
{
public
:
WCube
(
const
Point3
f
&
pt_min
,
const
Point3f
&
pt_max
,
bool
wire_frame
=
true
,
const
Color
&
color
=
Color
::
white
());
WCube
(
const
Point3
d
&
pt_min
,
const
Point3d
&
pt_max
,
bool
wire_frame
=
true
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WPolyLine
:
public
Widget3D
...
...
@@ -196,7 +196,7 @@ namespace cv
class
CV_EXPORTS
WText3D
:
public
Widget3D
{
public
:
WText3D
(
const
String
&
text
,
const
Point3
f
&
position
,
float
text_scale
=
1.
f
,
bool
face_camera
=
true
,
const
Color
&
color
=
Color
::
white
());
WText3D
(
const
String
&
text
,
const
Point3
d
&
position
,
double
text_scale
=
1.
,
bool
face_camera
=
true
,
const
Color
&
color
=
Color
::
white
());
void
setText
(
const
String
&
text
);
String
getText
()
const
;
...
...
@@ -216,7 +216,7 @@ namespace cv
//! Creates 3D image at the origin
WImage3D
(
const
Mat
&
image
,
const
Size
&
size
);
//! Creates 3D image at a given position, pointing in the direction of the normal, and having the up_vector orientation
WImage3D
(
const
Vec3
f
&
position
,
const
Vec3f
&
normal
,
const
Vec3f
&
up_vector
,
const
Mat
&
image
,
const
Size
&
size
);
WImage3D
(
const
Vec3
d
&
position
,
const
Vec3d
&
normal
,
const
Vec3d
&
up_vector
,
const
Mat
&
image
,
const
Size
&
size
);
void
setImage
(
const
Mat
&
image
);
};
...
...
@@ -234,24 +234,24 @@ namespace cv
{
public
:
//! Creates grid at the origin
WGrid
(
const
Vec2i
&
dimensions
,
const
Vec2
f
&
spacing
,
const
Color
&
color
=
Color
::
white
());
WGrid
(
const
Vec2i
&
dimensions
,
const
Vec2
d
&
spacing
,
const
Color
&
color
=
Color
::
white
());
//! Creates grid based on the plane equation
WGrid
(
const
Vec4
f
&
coeffs
,
const
Vec2i
&
dimensions
,
const
Vec2f
&
spacing
,
const
Color
&
color
=
Color
::
white
());
WGrid
(
const
Vec4
d
&
coeffs
,
const
Vec2i
&
dimensions
,
const
Vec2d
&
spacing
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WCameraPosition
:
public
Widget3D
{
public
:
//! Creates camera coordinate frame (axes) at the origin
WCameraPosition
(
float
scale
=
1.
f
);
WCameraPosition
(
double
scale
=
1.0
);
//! Creates frustum based on the intrinsic marix K at the origin
WCameraPosition
(
const
Matx33
f
&
K
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WCameraPosition
(
const
Matx33
d
&
K
,
double
scale
=
1.0
,
const
Color
&
color
=
Color
::
white
());
//! Creates frustum based on the field of view at the origin
WCameraPosition
(
const
Vec2
f
&
fov
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WCameraPosition
(
const
Vec2
d
&
fov
,
double
scale
=
1.0
,
const
Color
&
color
=
Color
::
white
());
//! Creates frustum and display given image at the far plane
WCameraPosition
(
const
Matx33
f
&
K
,
const
Mat
&
img
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WCameraPosition
(
const
Matx33
d
&
K
,
const
Mat
&
img
,
double
scale
=
1.0
,
const
Color
&
color
=
Color
::
white
());
//! Creates frustum and display given image at the far plane
WCameraPosition
(
const
Vec2
f
&
fov
,
const
Mat
&
img
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WCameraPosition
(
const
Vec2
d
&
fov
,
const
Mat
&
img
,
double
scale
=
1.0
,
const
Color
&
color
=
Color
::
white
());
};
/////////////////////////////////////////////////////////////////////////////
...
...
@@ -270,16 +270,16 @@ namespace cv
{
public
:
//! Displays trajectory of the given path by frustums
WTrajectoryFrustums
(
const
std
::
vector
<
Affine3d
>
&
path
,
const
Matx33
f
&
K
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WTrajectoryFrustums
(
const
std
::
vector
<
Affine3d
>
&
path
,
const
Matx33
d
&
K
,
double
scale
=
1.
,
const
Color
&
color
=
Color
::
white
());
//! Displays trajectory of the given path by frustums
WTrajectoryFrustums
(
const
std
::
vector
<
Affine3d
>
&
path
,
const
Vec2
f
&
fov
,
float
scale
=
1.
f
,
const
Color
&
color
=
Color
::
white
());
WTrajectoryFrustums
(
const
std
::
vector
<
Affine3d
>
&
path
,
const
Vec2
d
&
fov
,
double
scale
=
1.
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WTrajectorySpheres
:
public
Widget3D
{
public
:
WTrajectorySpheres
(
const
std
::
vector
<
Affine3d
>
&
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
());
WTrajectorySpheres
(
const
std
::
vector
<
Affine3d
>
&
path
,
double
line_length
=
0.05
,
double
init_sphere_radius
=
0.021
,
double
sphere_radius
=
0.007
,
const
Color
&
line_color
=
Color
::
white
(),
const
Color
&
sphere_color
=
Color
::
white
());
};
/////////////////////////////////////////////////////////////////////////////
...
...
@@ -308,7 +308,7 @@ namespace cv
class
CV_EXPORTS
WCloudNormals
:
public
Widget3D
{
public
:
WCloudNormals
(
InputArray
cloud
,
InputArray
normals
,
int
level
=
64
,
float
scale
=
0.1
f
,
const
Color
&
color
=
Color
::
white
());
WCloudNormals
(
InputArray
cloud
,
InputArray
normals
,
int
level
=
64
,
double
scale
=
0.1
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
WMesh
:
public
Widget3D
...
...
modules/viz/src/clouds.cpp
View file @
56819eaf
...
...
@@ -175,7 +175,7 @@ template<> cv::viz::WCloudCollection cv::viz::Widget::cast<cv::viz::WCloudCollec
///////////////////////////////////////////////////////////////////////////////////////////////
/// Cloud Normals Widget implementation
cv
::
viz
::
WCloudNormals
::
WCloudNormals
(
InputArray
_cloud
,
InputArray
_normals
,
int
level
,
float
scale
,
const
Color
&
color
)
cv
::
viz
::
WCloudNormals
::
WCloudNormals
(
InputArray
_cloud
,
InputArray
_normals
,
int
level
,
double
scale
,
const
Color
&
color
)
{
Mat
cloud
=
_cloud
.
getMat
();
Mat
normals
=
_normals
.
getMat
();
...
...
@@ -207,7 +207,7 @@ cv::viz::WCloudNormals::WCloudNormals(InputArray _cloud, InputArray _normals, in
for
(;
srow
<
send
;
srow
+=
xstep
*
s_chs
,
nrow
+=
xstep
*
n_chs
)
if
(
!
isNan
(
srow
)
&&
!
isNan
(
nrow
))
{
Vec3f
endp
=
Vec3f
(
srow
)
+
Vec3f
(
nrow
)
*
scale
;
Vec3f
endp
=
Vec3f
(
srow
)
+
Vec3f
(
nrow
)
*
(
float
)
scale
;
points
->
InsertNextPoint
(
srow
);
points
->
InsertNextPoint
(
endp
.
val
);
...
...
modules/viz/src/shapes.cpp
View file @
56819eaf
This diff is collapsed.
Click to expand it.
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