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
8c103d74
Commit
8c103d74
authored
Oct 21, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-added filter-general test; fixed failure in several calibrate* tests
parent
dde8cd7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
acameracalibration.cpp
tests/cv/src/acameracalibration.cpp
+18
-13
afilter.cpp
tests/cv/src/afilter.cpp
+1
-1
No files found.
tests/cv/src/acameracalibration.cpp
View file @
8c103d74
...
@@ -310,7 +310,7 @@ void CV_CameraCalibrationTest::run( int start_from )
...
@@ -310,7 +310,7 @@ void CV_CameraCalibrationTest::run( int start_from )
CvMatr64d
goodRotMatrs
;
CvMatr64d
goodRotMatrs
;
double
cameraMatrix
[
3
*
3
];
double
cameraMatrix
[
3
*
3
];
double
distortion
[
4
]
;
double
distortion
[
5
]
=
{
0
,
0
,
0
,
0
,
0
}
;
double
goodDistortion
[
4
];
double
goodDistortion
[
4
];
...
@@ -487,12 +487,15 @@ void CV_CameraCalibrationTest::run( int start_from )
...
@@ -487,12 +487,15 @@ void CV_CameraCalibrationTest::run( int start_from )
fscanf
(
file
,
"%lf"
,
goodTransVects
+
currImage
*
3
+
i
);
fscanf
(
file
,
"%lf"
,
goodTransVects
+
currImage
*
3
+
i
);
}
}
calibFlags
=
calibFlags
=
0
//CV_CALIB_FIX_PRINCIPAL_POINT +
// + CV_CALIB_FIX_PRINCIPAL_POINT
//CV_CALIB_ZERO_TANGENT_DIST +
// + CV_CALIB_ZERO_TANGENT_DIST
//CV_CALIB_FIX_ASPECT_RATIO +
// + CV_CALIB_FIX_ASPECT_RATIO
//CV_CALIB_USE_INTRINSIC_GUESS +
// + CV_CALIB_USE_INTRINSIC_GUESS
CV_CALIB_FIX_K3
;
+
CV_CALIB_FIX_K3
+
CV_CALIB_FIX_K4
+
CV_CALIB_FIX_K5
+
CV_CALIB_FIX_K6
;
memset
(
cameraMatrix
,
0
,
9
*
sizeof
(
cameraMatrix
[
0
])
);
memset
(
cameraMatrix
,
0
,
9
*
sizeof
(
cameraMatrix
[
0
])
);
cameraMatrix
[
0
]
=
cameraMatrix
[
4
]
=
807.
;
cameraMatrix
[
0
]
=
cameraMatrix
[
4
]
=
807.
;
cameraMatrix
[
2
]
=
(
imageSize
.
width
-
1
)
*
0.5
;
cameraMatrix
[
2
]
=
(
imageSize
.
width
-
1
)
*
0.5
;
...
@@ -564,25 +567,25 @@ void CV_CameraCalibrationTest::run( int start_from )
...
@@ -564,25 +567,25 @@ void CV_CameraCalibrationTest::run( int start_from )
/* ========= Compare parameters ========= */
/* ========= Compare parameters ========= */
/* ----- Compare focal lengths ----- */
/* ----- Compare focal lengths ----- */
code
=
compare
(
cameraMatrix
+
0
,
&
goodFcx
,
1
,
0.
0
1
,
"fx"
);
code
=
compare
(
cameraMatrix
+
0
,
&
goodFcx
,
1
,
0.1
,
"fx"
);
if
(
code
<
0
)
if
(
code
<
0
)
goto
_exit_
;
goto
_exit_
;
code
=
compare
(
cameraMatrix
+
4
,
&
goodFcy
,
1
,
0.
0
1
,
"fy"
);
code
=
compare
(
cameraMatrix
+
4
,
&
goodFcy
,
1
,
0.1
,
"fy"
);
if
(
code
<
0
)
if
(
code
<
0
)
goto
_exit_
;
goto
_exit_
;
/* ----- Compare principal points ----- */
/* ----- Compare principal points ----- */
code
=
compare
(
cameraMatrix
+
2
,
&
goodCx
,
1
,
0.
0
1
,
"cx"
);
code
=
compare
(
cameraMatrix
+
2
,
&
goodCx
,
1
,
0.1
,
"cx"
);
if
(
code
<
0
)
if
(
code
<
0
)
goto
_exit_
;
goto
_exit_
;
code
=
compare
(
cameraMatrix
+
5
,
&
goodCy
,
1
,
0.
0
1
,
"cy"
);
code
=
compare
(
cameraMatrix
+
5
,
&
goodCy
,
1
,
0.1
,
"cy"
);
if
(
code
<
0
)
if
(
code
<
0
)
goto
_exit_
;
goto
_exit_
;
/* ----- Compare distortion ----- */
/* ----- Compare distortion ----- */
code
=
compare
(
distortion
,
goodDistortion
,
4
,
0.
0
1
,
"[k1,k2,p1,p2]"
);
code
=
compare
(
distortion
,
goodDistortion
,
4
,
0.1
,
"[k1,k2,p1,p2]"
);
if
(
code
<
0
)
if
(
code
<
0
)
goto
_exit_
;
goto
_exit_
;
...
@@ -592,7 +595,7 @@ void CV_CameraCalibrationTest::run( int start_from )
...
@@ -592,7 +595,7 @@ void CV_CameraCalibrationTest::run( int start_from )
goto
_exit_
;
goto
_exit_
;
/* ----- Compare rot matrixs ----- */
/* ----- Compare rot matrixs ----- */
code
=
compare
(
transVects
,
goodTransVects
,
3
*
numImages
,
0.
05
,
"translation vectors"
);
code
=
compare
(
transVects
,
goodTransVects
,
3
*
numImages
,
0.
1
,
"translation vectors"
);
if
(
code
<
0
)
if
(
code
<
0
)
goto
_exit_
;
goto
_exit_
;
...
@@ -1443,6 +1446,8 @@ void CV_StereoCalibrationTest::run( int )
...
@@ -1443,6 +1446,8 @@ void CV_StereoCalibrationTest::run( int )
//+ CV_CALIB_FIX_ASPECT_RATIO
//+ CV_CALIB_FIX_ASPECT_RATIO
+
CV_CALIB_FIX_PRINCIPAL_POINT
+
CV_CALIB_FIX_PRINCIPAL_POINT
+
CV_CALIB_ZERO_TANGENT_DIST
+
CV_CALIB_ZERO_TANGENT_DIST
+
CV_CALIB_FIX_K3
+
CV_CALIB_FIX_K4
+
CV_CALIB_FIX_K5
//+ CV_CALIB_FIX_K6
);
);
err
/=
nframes
*
npoints
;
err
/=
nframes
*
npoints
;
if
(
err
>
maxReprojErr
)
if
(
err
>
maxReprojErr
)
...
...
tests/cv/src/afilter.cpp
View file @
8c103d74
...
@@ -618,7 +618,7 @@ void CV_FilterTest::prepare_to_validation( int test_case_idx )
...
@@ -618,7 +618,7 @@ void CV_FilterTest::prepare_to_validation( int test_case_idx )
cvTsConvolve2D
(
&
test_mat
[
TEMP
][
0
],
&
test_mat
[
REF_OUTPUT
][
0
],
&
test_mat
[
INPUT
][
1
],
anchor
);
cvTsConvolve2D
(
&
test_mat
[
TEMP
][
0
],
&
test_mat
[
REF_OUTPUT
][
0
],
&
test_mat
[
INPUT
][
1
],
anchor
);
}
}
//
CV_FilterTest filter;
CV_FilterTest
filter
;
////////////////////////
////////////////////////
...
...
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