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
4c66b876
Commit
4c66b876
authored
Dec 07, 2013
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed -Wshadow and other warnings, added rvec test
parent
f62ffa2a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
18 deletions
+33
-18
test_affine3.cpp
modules/calib3d/test/test_affine3.cpp
+27
-0
types.hpp
modules/viz/include/opencv2/viz/types.hpp
+2
-2
precomp.hpp
modules/viz/src/precomp.hpp
+0
-14
viz3d_impl.cpp
modules/viz/src/viz3d_impl.cpp
+4
-2
No files found.
modules/calib3d/test/test_affine3.cpp
View file @
4c66b876
...
...
@@ -79,3 +79,30 @@ TEST(Calib3d_Affine3f, accuracy)
ASSERT_LT
(
cv
::
norm
(
diff
,
cv
::
NORM_INF
),
1e-15
);
}
TEST
(
Calib3d_Affine3f
,
accuracy_rvec
)
{
cv
::
RNG
rng
;
typedef
float
T
;
cv
::
Affine3
<
T
>::
Vec3
w
;
cv
::
Affine3
<
T
>::
Mat3
u
,
vt
,
R
;
for
(
int
i
=
0
;
i
<
100
;
++
i
)
{
rng
.
fill
(
R
,
cv
::
RNG
::
UNIFORM
,
-
10
,
10
,
true
);
cv
::
SVD
::
compute
(
R
,
w
,
u
,
vt
,
cv
::
SVD
::
FULL_UV
+
cv
::
SVD
::
MODIFY_A
);
R
=
u
*
vt
;
//double s = (double)cv::getTickCount();
cv
::
Affine3
<
T
>::
Vec3
va
=
cv
::
Affine3
<
T
>
(
R
).
rvec
();
//std::cout << "M:" <<(cv::getTickCount() - s)*1000/cv::getTickFrequency() << std::endl;
cv
::
Affine3
<
T
>::
Vec3
vo
;
//s = (double)cv::getTickCount();
cv
::
Rodrigues
(
R
,
vo
);
//std::cout << "O:" <<(cv::getTickCount() - s)*1000/cv::getTickFrequency() << std::endl;
ASSERT_LT
(
cv
::
norm
(
va
-
vo
),
1e-9
);
}
}
modules/viz/include/opencv2/viz/types.hpp
View file @
4c66b876
...
...
@@ -176,8 +176,8 @@ namespace cv
/// cv::viz::Color
inline
cv
::
viz
::
Color
::
Color
()
:
Scalar
(
0
,
0
,
0
)
{}
inline
cv
::
viz
::
Color
::
Color
(
double
gray
)
:
Scalar
(
gray
,
gray
,
gray
)
{}
inline
cv
::
viz
::
Color
::
Color
(
double
blue
,
double
green
,
double
red
)
:
Scalar
(
blue
,
green
,
red
)
{}
inline
cv
::
viz
::
Color
::
Color
(
double
_gray
)
:
Scalar
(
_gray
,
_gray
,
_
gray
)
{}
inline
cv
::
viz
::
Color
::
Color
(
double
_blue
,
double
_green
,
double
_red
)
:
Scalar
(
_blue
,
_green
,
_
red
)
{}
inline
cv
::
viz
::
Color
::
Color
(
const
Scalar
&
color
)
:
Scalar
(
color
)
{}
inline
cv
::
viz
::
Color
cv
::
viz
::
Color
::
black
()
{
return
Color
(
0
,
0
,
0
);
}
...
...
modules/viz/src/precomp.hpp
View file @
4c66b876
...
...
@@ -54,14 +54,6 @@
#include <list>
#include <vector>
#if defined __GNUC__
#pragma GCC system_header
#ifdef __DEPRECATED
#undef __DEPRECATED
#define __DEPRECATED_DISABLED__
#endif
#endif
#include <vtkAppendPolyData.h>
#include <vtkAssemblyPath.h>
#include <vtkCellData.h>
...
...
@@ -70,7 +62,6 @@
#include <vtkSmartPointer.h>
#include <vtkDataSet.h>
#include <vtkPolygon.h>
//#include <vtkPointPicker.h>
#include <vtkUnstructuredGrid.h>
#include <vtkDiskSource.h>
#include <vtkPlaneSource.h>
...
...
@@ -120,11 +111,6 @@
#include <vtkAlgorithmOutput.h>
#include <vtkImageMapper.h>
#if defined __GNUC__ && defined __DEPRECATED_DISABLED__
#define __DEPRECATED
#undef __DEPRECATED_DISABLED__
#endif
#include <opencv2/core.hpp>
#include <opencv2/viz.hpp>
#include <opencv2/viz/widget_accessor.hpp>
...
...
modules/viz/src/viz3d_impl.cpp
View file @
4c66b876
...
...
@@ -48,6 +48,8 @@
#include "precomp.hpp"
vtkRenderWindowInteractor
*
vtkRenderWindowInteractorFixNew
();
#if 1 || !defined __APPLE__
vtkRenderWindowInteractor
*
vtkRenderWindowInteractorFixNew
()
{
...
...
@@ -57,7 +59,7 @@ vtkRenderWindowInteractor* vtkRenderWindowInteractorFixNew()
/////////////////////////////////////////////////////////////////////////////////////////////
cv
::
viz
::
Viz3d
::
VizImpl
::
VizImpl
(
const
String
&
name
)
:
s
tyle_
(
vtkSmartPointer
<
cv
::
viz
::
InteractorStyle
>::
New
())
,
widget_actor_map_
(
new
WidgetActorMap
),
s_lastDone_
(
0.0
)
:
s
_lastDone_
(
0.0
),
style_
(
vtkSmartPointer
<
cv
::
viz
::
InteractorStyle
>::
New
()),
widget_actor_map_
(
new
WidgetActorMap
)
{
renderer_
=
vtkSmartPointer
<
vtkRenderer
>::
New
();
...
...
@@ -77,7 +79,7 @@ cv::viz::Viz3d::VizImpl::VizImpl(const String &name)
style_
->
UseTimersOn
();
/////////////////////////////////////////////////
interactor_
=
vtkSmartPointer
<
vtkRenderWindowInteractor
>::
Take
(
vtkRenderWindowInteractorFixNew
());
interactor_
=
vtkSmartPointer
<
vtkRenderWindowInteractor
>::
Take
(
vtkRenderWindowInteractorFixNew
());
window_
->
AlphaBitPlanesOff
();
window_
->
PointSmoothingOff
();
...
...
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