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
54ef68e7
Commit
54ef68e7
authored
Nov 29, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved test build time
parent
678f3925
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
49 deletions
+63
-49
abundleadjustment.cpp
tests/cv/src/abundleadjustment.cpp
+24
-19
acameracalibration.cpp
tests/cv/src/acameracalibration.cpp
+18
-18
acameracalibration_artificial.cpp
tests/cv/src/acameracalibration_artificial.cpp
+1
-1
aposit.cpp
tests/cv/src/aposit.cpp
+2
-2
areprojectImageTo3D.cpp
tests/cv/src/areprojectImageTo3D.cpp
+1
-1
cvtest.h
tests/cv/src/cvtest.h
+12
-4
cxcoretest.h
tests/cxcore/src/cxcoretest.h
+2
-2
_cxts.h
tests/cxts/_cxts.h
+1
-0
cxts.h
tests/cxts/cxts.h
+2
-2
No files found.
tests/cv/src/abundleadjustment.cpp
View file @
54ef68e7
...
...
@@ -41,6 +41,8 @@
#include "cvtest.h"
#if 0
#if defined WIN32 || defined _WIN32
#include "direct.h"
#else
...
...
@@ -427,7 +429,7 @@ protected:
std
::
vector
<
Camera
*>
m_cameras
;
RigidBody
*
m_body
;
std
::
vector
<
CvPoint2D64
d
*>
m_image_points
;
std
::
vector
<
CvPoint2D64
f
*>
m_image_points
;
std
::
vector
<
int
*>
m_point_visibility
;
float
noise
;
...
...
@@ -1157,15 +1159,15 @@ void CV_BundleAdjustmentTest::run( int start_from )
int
numImages
;
CvSize
etalonSize
;
CvPoint2D64
d
*
imagePoints
;
CvPoint3D64
d
*
objectPoints
;
CvPoint2D64
d
*
reprojectPoints
;
CvPoint2D64
f
*
imagePoints
;
CvPoint3D64
f
*
objectPoints
;
CvPoint2D64
f
*
reprojectPoints
;
CvVect64d
transVects
;
CvMatr64d
rotMatrs
;
double
*
transVects
;
double
*
rotMatrs
;
CvVect64d
goodTransVects
;
CvMatr64d
goodRotMatrs
;
double
*
goodTransVects
;
double
*
goodRotMatrs
;
double
cameraMatrix
[
3
*
3
];
double
distortion
[
4
];
...
...
@@ -1278,14 +1280,14 @@ void CV_BundleAdjustmentTest::run( int start_from )
}
/* Need to allocate memory */
imagePoints
=
(
CvPoint2D64
d
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
d
));
imagePoints
=
(
CvPoint2D64
f
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
f
));
objectPoints
=
(
CvPoint3D64
d
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint3D64
d
));
objectPoints
=
(
CvPoint3D64
f
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint3D64
f
));
reprojectPoints
=
(
CvPoint2D64
d
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
d
));
reprojectPoints
=
(
CvPoint2D64
f
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
f
));
/* Alloc memory for numbers */
numbers
=
(
int
*
)
cvAlloc
(
numImages
*
sizeof
(
int
));
...
...
@@ -1297,11 +1299,11 @@ void CV_BundleAdjustmentTest::run( int start_from )
}
/* Allocate memory for translate vectors and rotmatrixs*/
transVects
=
(
CvVect64d
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
rotMatrs
=
(
CvMatr64d
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
transVects
=
(
double
*
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
rotMatrs
=
(
double
*
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
goodTransVects
=
(
CvVect64d
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
goodRotMatrs
=
(
CvMatr64d
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
goodTransVects
=
(
double
*
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
goodRotMatrs
=
(
double
*
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
/* Read object points */
i
=
0
;
/* shift for current point */
...
...
@@ -1379,7 +1381,7 @@ void CV_BundleAdjustmentTest::run( int start_from )
cameraMatrix
[
8
]
=
1.
;
/* Now we can calibrate camera */
cvCalibrateCamera_64
d
(
numImages
,
cvCalibrateCamera_64
f
(
numImages
,
numbers
,
imageSize
,
imagePoints
,
...
...
@@ -1528,3 +1530,6 @@ _exit_:
}
//CV_BundleAdjustmentTest bundleadjustment_test;
#endif
tests/cv/src/acameracalibration.cpp
View file @
54ef68e7
...
...
@@ -299,15 +299,15 @@ void CV_CameraCalibrationTest::run( int start_from )
CvSize
etalonSize
;
int
numImages
;
CvPoint2D64
d
*
imagePoints
;
CvPoint3D64
d
*
objectPoints
;
CvPoint2D64
d
*
reprojectPoints
;
CvPoint2D64
f
*
imagePoints
;
CvPoint3D64
f
*
objectPoints
;
CvPoint2D64
f
*
reprojectPoints
;
CvVect64d
transVects
;
CvMatr64d
rotMatrs
;
double
*
transVects
;
double
*
rotMatrs
;
CvVect64d
goodTransVects
;
CvMatr64d
goodRotMatrs
;
double
*
goodTransVects
;
double
*
goodRotMatrs
;
double
cameraMatrix
[
3
*
3
];
double
distortion
[
5
]
=
{
0
,
0
,
0
,
0
,
0
};
...
...
@@ -399,14 +399,14 @@ void CV_CameraCalibrationTest::run( int start_from )
}
/* Need to allocate memory */
imagePoints
=
(
CvPoint2D64
d
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
d
));
imagePoints
=
(
CvPoint2D64
f
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
f
));
objectPoints
=
(
CvPoint3D64
d
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint3D64
d
));
objectPoints
=
(
CvPoint3D64
f
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint3D64
f
));
reprojectPoints
=
(
CvPoint2D64
d
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
d
));
reprojectPoints
=
(
CvPoint2D64
f
*
)
cvAlloc
(
numPoints
*
numImages
*
sizeof
(
CvPoint2D64
f
));
/* Alloc memory for numbers */
numbers
=
(
int
*
)
cvAlloc
(
numImages
*
sizeof
(
int
));
...
...
@@ -418,11 +418,11 @@ void CV_CameraCalibrationTest::run( int start_from )
}
/* Allocate memory for translate vectors and rotmatrixs*/
transVects
=
(
CvVect64d
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
rotMatrs
=
(
CvMatr64d
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
transVects
=
(
double
*
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
rotMatrs
=
(
double
*
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
goodTransVects
=
(
CvVect64d
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
goodRotMatrs
=
(
CvMatr64d
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
goodTransVects
=
(
double
*
)
cvAlloc
(
3
*
1
*
numImages
*
sizeof
(
double
));
goodRotMatrs
=
(
double
*
)
cvAlloc
(
3
*
3
*
numImages
*
sizeof
(
double
));
/* Read object points */
i
=
0
;
/* shift for current point */
...
...
@@ -673,7 +673,7 @@ void CV_CameraCalibrationTest_C::calibrate( int imageCount, int* pointCounts,
double
*
distortionCoeffs
,
double
*
cameraMatrix
,
double
*
translationVectors
,
double
*
rotationMatrices
,
int
flags
)
{
cvCalibrateCamera_64d
(
imageCount
,
cvCalibrateCamera_64d
(
imageCount
,
pointCounts
,
imageSize
,
imagePoints
,
...
...
tests/cv/src/acameracalibration_artificial.cpp
View file @
54ef68e7
...
...
@@ -327,7 +327,7 @@ protected:
Mat
camMat_est
=
Mat
::
eye
(
3
,
3
,
CV_64F
),
distCoeffs_est
=
Mat
::
zeros
(
1
,
5
,
CV_64F
);
vector
<
Mat
>
rvecs_est
,
tvecs_est
;
int
flags
=
0
;
//CALIB_FIX_K3; //CALIB_FIX_ASPECT_RATIO | | CALIB_ZERO_TANGENT_DIST;
int
flags
=
/*CV_CALIB_FIX_K3|*/
CV_CALIB_FIX_K4
|
CV_CALIB_FIX_K5
|
CV_CALIB_FIX_K6
;
//CALIB_FIX_K3; //CALIB_FIX_ASPECT_RATIO | | CALIB_ZERO_TANGENT_DIST;
double
rep_error
=
calibrateCamera
(
objectPoints
,
imagePoints
,
imgSize
,
camMat_est
,
distCoeffs_est
,
rvecs_est
,
tvecs_est
,
flags
);
rep_error
/=
brdsNum
*
cornersSize
.
area
();
...
...
tests/cv/src/aposit.cpp
View file @
54ef68e7
...
...
@@ -161,8 +161,8 @@ void CV_POSITTest::run( int start_from )
for
(
i
=
0
;
i
<
8
;
i
++
)
{
float
vec
[
3
];
CvMat
Vec
=
cvMat
(
3
,
1
,
CV_
MAT
32F
,
vec
);
CvMat
Obj_point
=
cvMat
(
3
,
1
,
CV_
MAT
32F
,
&
obj_points
[
i
].
x
);
CvMat
Vec
=
cvMat
(
3
,
1
,
CV_32F
,
vec
);
CvMat
Obj_point
=
cvMat
(
3
,
1
,
CV_32F
,
&
obj_points
[
i
].
x
);
cvMatMul
(
true_rotation
,
&
Obj_point
,
&
Vec
);
...
...
tests/cv/src/areprojectImageTo3D.cpp
View file @
54ef68e7
...
...
@@ -117,7 +117,7 @@ protected:
{
typedef
Vec
<
OutT
,
3
>
out3d_t
;
bool
handleMissingValues
=
(
int
)
theRNG
()
%
2
==
0
;
bool
handleMissingValues
=
(
unsigned
)
theRNG
()
%
2
==
0
;
Mat_
<
InT
>
disp
(
Size
(
320
,
240
));
randu
(
disp
,
Scalar
(
min
),
Scalar
(
max
));
...
...
tests/cv/src/cvtest.h
View file @
54ef68e7
...
...
@@ -46,11 +46,19 @@
#pragma warning( disable: 4710 4711 4514 4996 )
#endif
#include "cv.h"
#include "cxmisc.h"
#include "cvaux.h"
#include "cxts.h"
#include "highgui.h"
#include "opencv2/legacy/legacy.hpp"
#include "opencv2/legacy/compat.hpp"
#include "opencv2/contrib/contrib.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/internal.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/video/tracking.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#undef min
#undef max
...
...
tests/cxcore/src/cxcoretest.h
View file @
54ef68e7
...
...
@@ -48,8 +48,8 @@
#undef max
#endif
#include "
cxcore.h
"
#include "
cxmisc.h
"
#include "
opencv2/core/core.hpp
"
#include "
opencv2/core/internal.hpp
"
#include "cxts.h"
/****************************************************************************************/
...
...
tests/cxts/_cxts.h
View file @
54ef68e7
...
...
@@ -47,6 +47,7 @@
#endif
#include "cxts.h"
#include "opencv2/core/internal.hpp"
#include <assert.h>
#include <float.h>
#include <limits.h>
...
...
tests/cxts/cxts.h
View file @
54ef68e7
...
...
@@ -42,8 +42,8 @@
#ifndef __CXTS_H__
#define __CXTS_H__
#include "
cxcore.h
"
#include "
cxmis
c.h"
#include "
opencv2/core/core.hpp
"
#include "
opencv2/core/core_
c.h"
#include <assert.h>
#include <limits.h>
#include <setjmp.h>
...
...
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