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
7410593d
Commit
7410593d
authored
Jan 18, 2014
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed warnigns and compiler errors for Ubuntu
parent
d7ca0bb7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
30 deletions
+30
-30
clouds.cpp
modules/viz/src/clouds.cpp
+2
-2
shapes.cpp
modules/viz/src/shapes.cpp
+3
-3
vtkCloudMatSource.cpp
modules/viz/src/vtk/vtkCloudMatSource.cpp
+24
-24
vtkImageMatSource.cpp
modules/viz/src/vtk/vtkImageMatSource.cpp
+1
-1
No files found.
modules/viz/src/clouds.cpp
View file @
7410593d
...
...
@@ -219,7 +219,7 @@ void cv::viz::WCloudCollection::addCloud(InputArray cloud, InputArray colors, co
mapper
->
ImmediateModeRenderingOff
();
VtkUtils
::
SetInputData
(
mapper
,
polydata
);
actor
->
SetNumberOfCloudPoints
(
std
::
max
(
1
,
polydata
->
GetNumberOfPoints
()
/
10
));
actor
->
SetNumberOfCloudPoints
(
std
::
max
<
vtkIdType
>
(
1
,
polydata
->
GetNumberOfPoints
()
/
10
));
actor
->
GetProperty
()
->
SetInterpolationToFlat
();
actor
->
GetProperty
()
->
BackfaceCullingOn
();
actor
->
SetMapper
(
mapper
);
...
...
@@ -236,7 +236,7 @@ void cv::viz::WCloudCollection::addCloud(InputArray cloud, InputArray colors, co
VtkUtils
::
SetInputData
(
mapper
,
append_filter
->
GetOutput
());
actor
->
SetNumberOfCloudPoints
(
std
::
max
(
1
,
actor
->
GetNumberOfCloudPoints
()
+
polydata
->
GetNumberOfPoints
()
/
10
));
actor
->
SetNumberOfCloudPoints
(
std
::
max
<
vtkIdType
>
(
1
,
actor
->
GetNumberOfCloudPoints
()
+
polydata
->
GetNumberOfPoints
()
/
10
));
}
void
cv
::
viz
::
WCloudCollection
::
addCloud
(
InputArray
cloud
,
const
Color
&
color
,
const
Affine3d
&
pose
)
...
...
modules/viz/src/shapes.cpp
View file @
7410593d
...
...
@@ -1064,9 +1064,9 @@ cv::viz::WTrajectorySpheres::WTrajectorySpheres(InputArray _path, double line_le
line_source
->
SetPoint1
(
curr
.
val
);
line_source
->
SetPoint2
(
lend
.
val
);
line_source
->
Update
();
vtkSmartPointer
<
vtkPolyData
>
polydata
=
line_source
->
GetOutput
();
polydata
->
GetCellData
()
->
SetScalars
(
VtkUtils
::
FillScalars
(
polydata
->
GetNumberOfCells
(),
c
));
VtkUtils
::
AddInputData
(
append_filter
,
polydata
);
vtkSmartPointer
<
vtkPolyData
>
polydata
_
=
line_source
->
GetOutput
();
polydata
_
->
GetCellData
()
->
SetScalars
(
VtkUtils
::
FillScalars
(
polydata_
->
GetNumberOfCells
(),
c
));
VtkUtils
::
AddInputData
(
append_filter
,
polydata
_
);
}
}
append_filter
->
Update
();
...
...
modules/viz/src/vtk/vtkCloudMatSource.cpp
View file @
7410593d
...
...
@@ -116,17 +116,17 @@ int cv::viz::vtkCloudMatSource::SetColorCloudNormals(InputArray _cloud, InputArr
CV_Assert
(
_normals
.
channels
()
==
3
||
_normals
.
channels
()
==
4
);
CV_Assert
(
_normals
.
size
()
==
_cloud
.
size
());
Mat
c
loud
=
_cloud
.
getMat
();
Mat
n
ormals
=
_normals
.
getMat
();
if
(
n
ormals
.
depth
()
==
CV_32F
&&
cloud
.
depth
()
==
CV_32F
)
filterNanNormalsCopy
<
float
,
float
>
(
n
ormals
,
cloud
,
total
);
else
if
(
n
ormals
.
depth
()
==
CV_32F
&&
cloud
.
depth
()
==
CV_64F
)
filterNanNormalsCopy
<
float
,
double
>
(
n
ormals
,
cloud
,
total
);
else
if
(
n
ormals
.
depth
()
==
CV_64F
&&
cloud
.
depth
()
==
CV_32F
)
filterNanNormalsCopy
<
double
,
float
>
(
n
ormals
,
cloud
,
total
);
else
if
(
n
ormals
.
depth
()
==
CV_64F
&&
cloud
.
depth
()
==
CV_64F
)
filterNanNormalsCopy
<
double
,
double
>
(
n
ormals
,
cloud
,
total
);
Mat
c
=
_cloud
.
getMat
();
Mat
n
=
_normals
.
getMat
();
if
(
n
.
depth
()
==
CV_32F
&&
c
.
depth
()
==
CV_32F
)
filterNanNormalsCopy
<
float
,
float
>
(
n
,
c
,
total
);
else
if
(
n
.
depth
()
==
CV_32F
&&
c
.
depth
()
==
CV_64F
)
filterNanNormalsCopy
<
float
,
double
>
(
n
,
c
,
total
);
else
if
(
n
.
depth
()
==
CV_64F
&&
c
.
depth
()
==
CV_32F
)
filterNanNormalsCopy
<
double
,
float
>
(
n
,
c
,
total
);
else
if
(
n
.
depth
()
==
CV_64F
&&
c
.
depth
()
==
CV_64F
)
filterNanNormalsCopy
<
double
,
double
>
(
n
,
c
,
total
);
else
CV_Assert
(
!
"Unsupported normals/cloud type"
);
...
...
@@ -143,17 +143,17 @@ int cv::viz::vtkCloudMatSource::SetColorCloudNormalsTCoords(InputArray _cloud, I
CV_Assert
(
_tcoords
.
depth
()
==
CV_32F
||
_tcoords
.
depth
()
==
CV_64F
);
CV_Assert
(
_tcoords
.
channels
()
==
2
&&
_tcoords
.
size
()
==
_cloud
.
size
());
Mat
cl
oud
=
_cloud
.
getMat
();
Mat
tc
oords
=
_tcoords
.
getMat
();
if
(
tc
oords
.
depth
()
==
CV_32F
&&
cloud
.
depth
()
==
CV_32F
)
filterNanTCoordsCopy
<
float
,
float
>
(
tc
oords
,
cloud
,
total
);
else
if
(
tc
oords
.
depth
()
==
CV_32F
&&
cloud
.
depth
()
==
CV_64F
)
filterNanTCoordsCopy
<
float
,
double
>
(
tc
oords
,
cloud
,
total
);
else
if
(
tc
oords
.
depth
()
==
CV_64F
&&
cloud
.
depth
()
==
CV_32F
)
filterNanTCoordsCopy
<
double
,
float
>
(
tc
oords
,
cloud
,
total
);
else
if
(
tc
oords
.
depth
()
==
CV_64F
&&
cloud
.
depth
()
==
CV_64F
)
filterNanTCoordsCopy
<
double
,
double
>
(
tc
oords
,
cloud
,
total
);
Mat
cl
=
_cloud
.
getMat
();
Mat
tc
=
_tcoords
.
getMat
();
if
(
tc
.
depth
()
==
CV_32F
&&
cl
.
depth
()
==
CV_32F
)
filterNanTCoordsCopy
<
float
,
float
>
(
tc
,
cl
,
total
);
else
if
(
tc
.
depth
()
==
CV_32F
&&
cl
.
depth
()
==
CV_64F
)
filterNanTCoordsCopy
<
float
,
double
>
(
tc
,
cl
,
total
);
else
if
(
tc
.
depth
()
==
CV_64F
&&
cl
.
depth
()
==
CV_32F
)
filterNanTCoordsCopy
<
double
,
float
>
(
tc
,
cl
,
total
);
else
if
(
tc
.
depth
()
==
CV_64F
&&
cl
.
depth
()
==
CV_64F
)
filterNanTCoordsCopy
<
double
,
double
>
(
tc
,
cl
,
total
);
else
CV_Assert
(
!
"Unsupported tcoords/cloud type"
);
...
...
@@ -241,7 +241,7 @@ void cv::viz::vtkCloudMatSource::filterNanColorsCopy(const Mat& cloud_colors, co
template
<
typename
_Tn
,
typename
_Msk
>
void
cv
::
viz
::
vtkCloudMatSource
::
filterNanNormalsCopy
(
const
Mat
&
cloud_normals
,
const
Mat
&
mask
,
int
total
)
{
normals
=
vtkSmartPointer
<
VtkDepthTraits
<
_Tn
>::
array_type
>::
New
();
normals
=
vtkSmartPointer
<
typename
VtkDepthTraits
<
_Tn
>::
array_type
>::
New
();
normals
->
SetName
(
"Normals"
);
normals
->
SetNumberOfComponents
(
3
);
normals
->
SetNumberOfTuples
(
total
);
...
...
@@ -267,7 +267,7 @@ template<typename _Tn, typename _Msk>
void
cv
::
viz
::
vtkCloudMatSource
::
filterNanTCoordsCopy
(
const
Mat
&
_tcoords
,
const
Mat
&
mask
,
int
total
)
{
typedef
Vec
<
_Tn
,
2
>
Vec2
;
tcoords
=
vtkSmartPointer
<
VtkDepthTraits
<
_Tn
>::
array_type
>::
New
();
tcoords
=
vtkSmartPointer
<
typename
VtkDepthTraits
<
_Tn
>::
array_type
>::
New
();
tcoords
->
SetName
(
"TextureCoordinates"
);
tcoords
->
SetNumberOfComponents
(
2
);
tcoords
->
SetNumberOfTuples
(
total
);
...
...
modules/viz/src/vtk/vtkImageMatSource.cpp
View file @
7410593d
...
...
@@ -78,7 +78,7 @@ int cv::viz::vtkImageMatSource::RequestData(vtkInformation*, vtkInformationVecto
void
cv
::
viz
::
vtkImageMatSource
::
SetImage
(
InputArray
_image
)
{
CV_Assert
(
_image
.
depth
()
==
CV_8U
&&
_image
.
channels
()
==
1
||
_image
.
channels
()
==
3
||
_image
.
channels
()
==
4
);
CV_Assert
(
_image
.
depth
()
==
CV_8U
&&
(
_image
.
channels
()
==
1
||
_image
.
channels
()
==
3
||
_image
.
channels
()
==
4
)
);
Mat
image
=
_image
.
getMat
();
...
...
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