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
030400d5
Commit
030400d5
authored
Jul 07, 2013
by
ozantonkal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
circle widget thickness property
parent
9d684a39
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
+12
-13
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+1
-1
simple_widgets.cpp
modules/viz/src/simple_widgets.cpp
+4
-5
test_viz3d.cpp
modules/viz/test/test_viz3d.cpp
+7
-7
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
030400d5
...
...
@@ -65,7 +65,7 @@ namespace temp_viz
class
CV_EXPORTS
CircleWidget
:
public
Widget
{
public
:
CircleWidget
(
const
Point3f
&
pt
,
double
radius
,
const
Color
&
color
=
Color
::
white
());
CircleWidget
(
const
Point3f
&
pt
,
double
radius
,
double
thickness
=
0.01
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
CylinderWidget
:
public
Widget
...
...
modules/viz/src/simple_widgets.cpp
View file @
030400d5
...
...
@@ -156,14 +156,13 @@ temp_viz::ArrowWidget::ArrowWidget(const Point3f& pt1, const Point3f& pt2, const
///////////////////////////////////////////////////////////////////////////////////////////////
/// circle widget implementation
temp_viz
::
CircleWidget
::
CircleWidget
(
const
temp_viz
::
Point3f
&
pt
,
double
radius
,
const
temp_viz
::
Color
&
color
)
temp_viz
::
CircleWidget
::
CircleWidget
(
const
temp_viz
::
Point3f
&
pt
,
double
radius
,
double
thickness
,
const
temp_viz
::
Color
&
color
)
{
vtkSmartPointer
<
vtkDiskSource
>
disk
=
vtkSmartPointer
<
vtkDiskSource
>::
New
();
// Maybe the resolution should be lower e.g. 50 or 25
disk
->
SetCircumferentialResolution
(
100
);
disk
->
SetInnerRadius
(
radius
-
0.001
);
disk
->
SetOuterRadius
(
radius
+
0.001
);
disk
->
SetCircumferentialResolution
(
20
);
disk
->
SetCircumferentialResolution
(
50
);
disk
->
SetInnerRadius
(
radius
-
thickness
);
disk
->
SetOuterRadius
(
radius
+
thickness
);
// Set the circle origin
vtkSmartPointer
<
vtkTransform
>
t
=
vtkSmartPointer
<
vtkTransform
>::
New
();
...
...
modules/viz/test/test_viz3d.cpp
View file @
030400d5
...
...
@@ -94,18 +94,18 @@ TEST(Viz_viz3d, accuracy)
temp_viz
::
PlaneWidget
pw
(
cv
::
Vec4f
(
0.0
,
1.0
,
2.0
,
3.0
));
temp_viz
::
SphereWidget
sw
(
cv
::
Point3f
(
0
,
0
,
0
),
0.5
);
temp_viz
::
ArrowWidget
aw
(
cv
::
Point3f
(
0
,
0
,
0
),
cv
::
Point3f
(
1
,
1
,
1
),
temp_viz
::
Color
(
255
,
0
,
0
));
temp_viz
::
CircleWidget
cw
(
cv
::
Point3f
(
0
,
0
,
0
),
1.0
,
temp_viz
::
Color
(
0
,
255
,
0
));
temp_viz
::
CircleWidget
cw
(
cv
::
Point3f
(
0
,
0
,
0
),
0.5
,
0.01
,
temp_viz
::
Color
(
0
,
255
,
0
));
temp_viz
::
CylinderWidget
cyw
(
cv
::
Point3f
(
0
,
0
,
0
),
cv
::
Point3f
(
-
1
,
-
1
,
-
1
),
0.5
,
30
,
temp_viz
::
Color
(
0
,
255
,
0
));
temp_viz
::
CubeWidget
cuw
(
cv
::
Point3f
(
-
2
,
-
2
,
-
2
),
cv
::
Point3f
(
-
1
,
-
1
,
-
1
),
temp_viz
::
Color
(
0
,
0
,
255
));
temp_viz
::
CoordinateSystemWidget
csw
(
1.0
f
,
cv
::
Affine3f
::
Identity
());
v
.
showWidget
(
"line"
,
lw
);
v
.
showWidget
(
"plane"
,
pw
);
v
.
showWidget
(
"sphere"
,
sw
);
v
.
showWidget
(
"arrow"
,
aw
);
//
v.showWidget("line", lw);
//
v.showWidget("plane", pw);
//
v.showWidget("sphere", sw);
//
v.showWidget("arrow", aw);
v
.
showWidget
(
"circle"
,
cw
);
v
.
showWidget
(
"cylinder"
,
cyw
);
v
.
showWidget
(
"cube"
,
cuw
);
//
v.showWidget("cylinder", cyw);
//
v.showWidget("cube", cuw);
v
.
showWidget
(
"coordinateSystem"
,
csw
);
temp_viz
::
LineWidget
lw2
=
lw
;
...
...
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