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
eafcdc00
Commit
eafcdc00
authored
Jul 07, 2013
by
ozantonkal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plane widget size
parent
030400d5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+2
-2
simple_widgets.cpp
modules/viz/src/simple_widgets.cpp
+4
-2
test_viz3d.cpp
modules/viz/test/test_viz3d.cpp
+3
-3
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
eafcdc00
...
...
@@ -46,8 +46,8 @@ namespace temp_viz
class
CV_EXPORTS
PlaneWidget
:
public
Widget
{
public
:
PlaneWidget
(
const
Vec4f
&
coefs
,
const
Color
&
color
=
Color
::
white
());
PlaneWidget
(
const
Vec4f
&
coefs
,
const
Point3f
&
pt
,
const
Color
&
color
=
Color
::
white
());
PlaneWidget
(
const
Vec4f
&
coefs
,
double
size
=
1.0
,
const
Color
&
color
=
Color
::
white
());
PlaneWidget
(
const
Vec4f
&
coefs
,
const
Point3f
&
pt
,
double
size
=
1.0
,
const
Color
&
color
=
Color
::
white
());
};
class
CV_EXPORTS
SphereWidget
:
public
Widget
...
...
modules/viz/src/simple_widgets.cpp
View file @
eafcdc00
...
...
@@ -33,7 +33,7 @@ float temp_viz::LineWidget::getLineWidth()
///////////////////////////////////////////////////////////////////////////////////////////////
/// plane widget implementation
temp_viz
::
PlaneWidget
::
PlaneWidget
(
const
Vec4f
&
coefs
,
const
Color
&
color
)
temp_viz
::
PlaneWidget
::
PlaneWidget
(
const
Vec4f
&
coefs
,
double
size
,
const
Color
&
color
)
{
vtkSmartPointer
<
vtkPlaneSource
>
plane
=
vtkSmartPointer
<
vtkPlaneSource
>::
New
();
plane
->
SetNormal
(
coefs
[
0
],
coefs
[
1
],
coefs
[
2
]);
...
...
@@ -45,11 +45,12 @@ temp_viz::PlaneWidget::PlaneWidget(const Vec4f& coefs, const Color &color)
vtkSmartPointer
<
vtkLODActor
>
actor
=
WidgetAccessor
::
getActor
(
*
this
);
actor
->
SetMapper
(
mapper
);
actor
->
SetScale
(
size
);
setColor
(
color
);
}
temp_viz
::
PlaneWidget
::
PlaneWidget
(
const
Vec4f
&
coefs
,
const
Point3f
&
pt
,
const
Color
&
color
)
temp_viz
::
PlaneWidget
::
PlaneWidget
(
const
Vec4f
&
coefs
,
const
Point3f
&
pt
,
double
size
,
const
Color
&
color
)
{
vtkSmartPointer
<
vtkPlaneSource
>
plane
=
vtkSmartPointer
<
vtkPlaneSource
>::
New
();
cv
::
Point3f
coefs3
(
coefs
[
0
],
coefs
[
1
],
coefs
[
2
]);
...
...
@@ -65,6 +66,7 @@ temp_viz::PlaneWidget::PlaneWidget(const Vec4f& coefs, const Point3f& pt, const
vtkSmartPointer
<
vtkLODActor
>
actor
=
WidgetAccessor
::
getActor
(
*
this
);
actor
->
SetMapper
(
mapper
);
actor
->
SetScale
(
size
);
setColor
(
color
);
}
...
...
modules/viz/test/test_viz3d.cpp
View file @
eafcdc00
...
...
@@ -91,7 +91,7 @@ TEST(Viz_viz3d, accuracy)
int
col_red
=
0
;
temp_viz
::
LineWidget
lw
(
cv
::
Point3f
(
0.0
,
0.0
,
0.0
),
cv
::
Point3f
(
4.0
,
4.0
,
4.0
),
temp_viz
::
Color
(
0
,
255
,
0
));
temp_viz
::
PlaneWidget
pw
(
cv
::
Vec4f
(
0.0
,
1.0
,
2.0
,
3.0
));
temp_viz
::
PlaneWidget
pw
(
cv
::
Vec4f
(
0.0
,
1.0
,
2.0
,
3.0
)
,
5.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
),
0.5
,
0.01
,
temp_viz
::
Color
(
0
,
255
,
0
));
...
...
@@ -100,10 +100,10 @@ TEST(Viz_viz3d, accuracy)
temp_viz
::
CoordinateSystemWidget
csw
(
1.0
f
,
cv
::
Affine3f
::
Identity
());
// v.showWidget("line", lw);
//
v.showWidget("plane", pw);
v
.
showWidget
(
"plane"
,
pw
);
// v.showWidget("sphere", sw);
// v.showWidget("arrow", aw);
v
.
showWidget
(
"circle"
,
cw
);
//
v.showWidget("circle", cw);
// v.showWidget("cylinder", cyw);
// v.showWidget("cube", cuw);
v
.
showWidget
(
"coordinateSystem"
,
csw
);
...
...
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