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
46cf22cd
Commit
46cf22cd
authored
Jun 12, 2013
by
ozantonkal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
showPointCloud with single color
parent
01086323
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
1 deletion
+15
-1
viz3d.hpp
modules/viz/include/opencv2/viz/viz3d.hpp
+1
-0
viz3d_impl.hpp
modules/viz/src/q/viz3d_impl.hpp
+1
-0
viz3d.cpp
modules/viz/src/viz3d.cpp
+5
-0
viz3d_impl.cpp
modules/viz/src/viz3d_impl.cpp
+8
-1
No files found.
modules/viz/include/opencv2/viz/viz3d.hpp
View file @
46cf22cd
...
...
@@ -28,6 +28,7 @@ namespace temp_viz
void
addCoordinateSystem
(
double
scale
,
const
Affine3f
&
t
,
const
String
&
id
=
"coordinate"
);
void
showPointCloud
(
const
String
&
id
,
InputArray
cloud
,
InputArray
colors
,
const
Affine3f
&
pose
=
Affine3f
::
Identity
());
void
showPointCloud
(
const
String
&
id
,
InputArray
cloud
,
const
Color
&
color
,
const
Affine3f
&
pose
=
Affine3f
::
Identity
());
bool
addPointCloudNormals
(
const
Mat
&
cloud
,
const
Mat
&
normals
,
int
level
=
100
,
float
scale
=
0.02
f
,
const
String
&
id
=
"cloud"
);
...
...
modules/viz/src/q/viz3d_impl.hpp
View file @
46cf22cd
...
...
@@ -104,6 +104,7 @@ public:
* \param[in] pose transform to be applied on the point cloud
*/
void
showPointCloud
(
const
String
&
id
,
InputArray
cloud
,
InputArray
colors
,
const
Affine3f
&
pose
=
Affine3f
::
Identity
());
void
showPointCloud
(
const
String
&
id
,
InputArray
cloud
,
const
Color
&
color
,
const
Affine3f
&
pose
=
Affine3f
::
Identity
());
bool
addPolygonMesh
(
const
Mesh3d
&
mesh
,
const
cv
::
Mat
&
mask
,
const
std
::
string
&
id
=
"polygon"
);
bool
updatePolygonMesh
(
const
Mesh3d
&
mesh
,
const
cv
::
Mat
&
mask
,
const
std
::
string
&
id
=
"polygon"
);
...
...
modules/viz/src/viz3d.cpp
View file @
46cf22cd
...
...
@@ -28,6 +28,11 @@ void temp_viz::Viz3d::showPointCloud(const String& id, InputArray cloud, InputAr
impl_
->
showPointCloud
(
id
,
cloud
,
colors
,
pose
);
}
void
temp_viz
::
Viz3d
::
showPointCloud
(
const
String
&
id
,
InputArray
cloud
,
const
Color
&
color
,
const
Affine3f
&
pose
)
{
impl_
->
showPointCloud
(
id
,
cloud
,
color
,
pose
);
}
bool
temp_viz
::
Viz3d
::
addPointCloudNormals
(
const
Mat
&
cloud
,
const
Mat
&
normals
,
int
level
,
float
scale
,
const
String
&
id
)
{
return
impl_
->
addPointCloudNormals
(
cloud
,
normals
,
level
,
scale
,
id
);
...
...
modules/viz/src/viz3d_impl.cpp
View file @
46cf22cd
...
...
@@ -114,7 +114,7 @@ void temp_viz::Viz3d::VizImpl::showPointCloud(const String& id, InputArray _clou
vtkSmartPointer
<
vtkIdTypeArray
>
cells
=
vertices
->
GetData
();
if
(
exist
)
updateCells
(
cells
,
initcells
,
nr_points
);
updateCells
(
cells
,
initcells
,
nr_points
);
else
updateCells
(
cells
,
am_it
->
second
.
cells
,
nr_points
);
...
...
@@ -166,6 +166,13 @@ void temp_viz::Viz3d::VizImpl::showPointCloud(const String& id, InputArray _clou
}
}
void
temp_viz
::
Viz3d
::
VizImpl
::
showPointCloud
(
const
String
&
id
,
InputArray
_cloud
,
const
Color
&
color
,
const
Affine3f
&
pose
)
{
// Generate an array of colors from single color
Mat
colors
(
_cloud
.
size
(),
CV_8UC3
,
color
);
showPointCloud
(
id
,
_cloud
,
colors
,
pose
);
}
bool
temp_viz
::
Viz3d
::
VizImpl
::
addPointCloudNormals
(
const
cv
::
Mat
&
cloud
,
const
cv
::
Mat
&
normals
,
int
level
,
float
scale
,
const
std
::
string
&
id
)
{
CV_Assert
(
cloud
.
size
()
==
normals
.
size
()
&&
cloud
.
type
()
==
CV_32FC3
&&
normals
.
type
()
==
CV_32FC3
);
...
...
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