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
1bfd7ad1
Commit
1bfd7ad1
authored
Jul 15, 2013
by
ozantonkal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arrow widget thickness parameter
parent
dc348ff9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+1
-1
shape_widgets.cpp
modules/viz/src/shape_widgets.cpp
+5
-1
test_viz3d.cpp
modules/viz/test/test_viz3d.cpp
+1
-1
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
1bfd7ad1
...
...
@@ -81,7 +81,7 @@ namespace cv
class
CV_EXPORTS
ArrowWidget
:
public
Widget3D
{
public
:
ArrowWidget
(
const
Point3f
&
pt1
,
const
Point3f
&
pt2
,
const
Color
&
color
=
Color
::
white
());
ArrowWidget
(
const
Point3f
&
pt1
,
const
Point3f
&
pt2
,
double
thickness
=
0.03
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
CircleWidget
:
public
Widget3D
...
...
modules/viz/src/shape_widgets.cpp
View file @
1bfd7ad1
...
...
@@ -128,9 +128,13 @@ template<> cv::viz::SphereWidget cv::viz::Widget::cast<cv::viz::SphereWidget>()
///////////////////////////////////////////////////////////////////////////////////////////////
/// arrow widget implementation
cv
::
viz
::
ArrowWidget
::
ArrowWidget
(
const
Point3f
&
pt1
,
const
Point3f
&
pt2
,
const
Color
&
color
)
cv
::
viz
::
ArrowWidget
::
ArrowWidget
(
const
Point3f
&
pt1
,
const
Point3f
&
pt2
,
double
thickness
,
const
Color
&
color
)
{
vtkSmartPointer
<
vtkArrowSource
>
arrowSource
=
vtkSmartPointer
<
vtkArrowSource
>::
New
();
arrowSource
->
SetShaftRadius
(
thickness
);
// The thickness and radius of the tip are adjusted based on the thickness of the arrow
arrowSource
->
SetTipRadius
(
thickness
*
3.0
);
arrowSource
->
SetTipLength
(
thickness
*
10.0
);
float
startPoint
[
3
],
endPoint
[
3
];
startPoint
[
0
]
=
pt1
.
x
;
...
...
modules/viz/test/test_viz3d.cpp
View file @
1bfd7ad1
...
...
@@ -90,7 +90,7 @@ TEST(Viz_viz3d, accuracy)
viz
::
LineWidget
lw
(
Point3f
(
0
,
0
,
0
),
Point3f
(
4.
f
,
4.
f
,
4.
f
),
viz
::
Color
::
green
());
viz
::
PlaneWidget
pw
(
Vec4f
(
0.0
,
1.0
,
2.0
,
3.0
),
5.0
);
viz
::
SphereWidget
sw
(
Point3f
(
0
,
0
,
0
),
0.5
);
viz
::
ArrowWidget
aw
(
Point3f
(
0
,
0
,
0
),
Point3f
(
1
,
1
,
1
),
viz
::
Color
::
red
());
viz
::
ArrowWidget
aw
(
Point3f
(
0
,
0
,
0
),
Point3f
(
1
,
1
,
1
),
0.01
,
viz
::
Color
::
red
());
viz
::
CircleWidget
cw
(
Point3f
(
0
,
0
,
0
),
0.5
,
0.01
,
viz
::
Color
::
green
());
viz
::
CylinderWidget
cyw
(
Point3f
(
0
,
0
,
0
),
Point3f
(
-
1
,
-
1
,
-
1
),
0.5
,
30
,
viz
::
Color
::
green
());
viz
::
CubeWidget
cuw
(
Point3f
(
-
2
,
-
2
,
-
2
),
Point3f
(
-
1
,
-
1
,
-
1
));
...
...
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