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
baee8c3a
Commit
baee8c3a
authored
Jan 01, 2014
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored Mesh, added tests, added failing "twice spin()" test
parent
70a81db5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
5 deletions
+39
-5
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+2
-2
clouds.cpp
modules/viz/src/clouds.cpp
+0
-0
vtkCloudMatSource.cpp
modules/viz/src/vtk/vtkCloudMatSource.cpp
+3
-3
tests_simple.cpp
modules/viz/test/tests_simple.cpp
+34
-0
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
baee8c3a
...
...
@@ -65,14 +65,14 @@ namespace cv
SHADING
};
enum
Re
nderingRepresentationProperti
es
enum
Re
presentationValu
es
{
REPRESENTATION_POINTS
,
REPRESENTATION_WIREFRAME
,
REPRESENTATION_SURFACE
};
enum
Shading
RepresentationProperti
es
enum
Shading
Valu
es
{
SHADING_FLAT
,
SHADING_GOURAUD
,
...
...
modules/viz/src/clouds.cpp
View file @
baee8c3a
This diff is collapsed.
Click to expand it.
modules/viz/src/vtk/vtkCloudMatSource.cpp
View file @
baee8c3a
...
...
@@ -163,14 +163,14 @@ int cv::viz::vtkCloudMatSource::filterNanCopy(const Mat& cloud)
points
->
Allocate
(
cloud
.
total
());
points
->
SetNumberOfPoints
(
cloud
.
total
());
int
cn
=
cloud
.
channels
();
int
s_chs
=
cloud
.
channels
();
int
total
=
0
;
for
(
int
y
=
0
;
y
<
cloud
.
rows
;
++
y
)
{
const
_Tp
*
srow
=
cloud
.
ptr
<
_Tp
>
(
y
);
const
_Tp
*
send
=
srow
+
cloud
.
cols
*
cn
;
const
_Tp
*
send
=
srow
+
cloud
.
cols
*
s_chs
;
for
(;
srow
!=
send
;
srow
+=
cn
)
for
(;
srow
!=
send
;
srow
+=
s_chs
)
if
(
!
isNan
(
srow
))
points
->
SetPoint
(
total
++
,
srow
);
}
...
...
modules/viz/test/tests_simple.cpp
View file @
baee8c3a
...
...
@@ -100,3 +100,37 @@ TEST(Viz, DISABLED_show_cloud_collection)
viz
.
showWidget
(
"ccol"
,
ccol
);
viz
.
spin
();
}
TEST
(
Viz
,
DISABLED_show_mesh
)
{
Mesh3d
mesh
=
Mesh3d
::
load
(
get_dragon_ply_file_path
());
Viz3d
viz
(
"show_mesh"
);
viz
.
showWidget
(
"coosys"
,
WCoordinateSystem
());
viz
.
showWidget
(
"mesh"
,
WMesh
(
mesh
));
viz
.
spin
();
}
TEST
(
Viz
,
DISABLED_show_mesh_random_colors
)
{
Mesh3d
mesh
=
Mesh3d
::
load
(
get_dragon_ply_file_path
());
theRNG
().
fill
(
mesh
.
colors
,
RNG
::
UNIFORM
,
0
,
255
);
Viz3d
viz
(
"show_mesh_random_color"
);
viz
.
showWidget
(
"coosys"
,
WCoordinateSystem
());
viz
.
showWidget
(
"mesh"
,
WMesh
(
mesh
));
viz
.
setRenderingProperty
(
"mesh"
,
SHADING
,
SHADING_PHONG
);
viz
.
spin
();
}
TEST
(
Viz
,
DISABLED_spin_twice_____________________________TODO_UI_BUG
)
{
Mesh3d
mesh
=
Mesh3d
::
load
(
get_dragon_ply_file_path
());
Viz3d
viz
(
"spin_twice"
);
viz
.
showWidget
(
"coosys"
,
WCoordinateSystem
());
viz
.
showWidget
(
"mesh"
,
WMesh
(
mesh
));
viz
.
spin
();
viz
.
spin
();
}
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