projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e72a232
)
Added a check that Tx after rectification is equal to distance between cameras
author
Ilya Lysenkov
<no@email>
Tue, 27 Mar 2012 16:47:19 +0000
(16:47 +0000)
committer
Ilya Lysenkov
<no@email>
Tue, 27 Mar 2012 16:47:19 +0000
(16:47 +0000)
modules/calib3d/test/test_cameracalibration.cpp
patch
|
blob
|
history
diff --git
a/modules/calib3d/test/test_cameracalibration.cpp
b/modules/calib3d/test/test_cameracalibration.cpp
index
c98f372
..
e9f9b73
100644
(file)
--- a/
modules/calib3d/test/test_cameracalibration.cpp
+++ b/
modules/calib3d/test/test_cameracalibration.cpp
@@
-1478,6
+1478,14
@@
void CV_StereoCalibrationTest::run( int )
return;
}
+ //check that Tx after rectification is equal to distance between cameras
+ double tx = fabs(P2.at<double>(0, 3) / P2.at<double>(0, 0));
+ if (fabs(tx - norm(T)) > 1e-5)
+ {
+ ts->set_failed_test_info( cvtest::TS::FAIL_BAD_ACCURACY );
+ return;
+ }
+
//check that Q reprojects points before the camera
double testPoint[4] = {0.0, 0.0, 100.0, 1.0};
Mat reprojectedTestPoint = Q * Mat_<double>(4, 1, testPoint);