Move cv::Mat out of core.hpp
This commit is contained in:
@@ -189,13 +189,13 @@ void CV_POSITTest::run( int start_from )
|
||||
rotation->data.fl, translation->data.fl );
|
||||
cvReleasePOSITObject( &object );
|
||||
|
||||
//Mat _rotation = cvarrToMat(rotation), _true_rotation = cvarrToMat(true_rotation);
|
||||
//Mat _translation = cvarrToMat(translation), _true_translation = cvarrToMat(true_translation);
|
||||
code = cvtest::cmpEps2( ts, rotation, true_rotation, flEpsilon, false, "rotation matrix" );
|
||||
Mat _rotation = cvarrToMat(rotation), _true_rotation = cvarrToMat(true_rotation);
|
||||
Mat _translation = cvarrToMat(translation), _true_translation = cvarrToMat(true_translation);
|
||||
code = cvtest::cmpEps2( ts, _rotation, _true_rotation, flEpsilon, false, "rotation matrix" );
|
||||
if( code < 0 )
|
||||
break;
|
||||
|
||||
code = cvtest::cmpEps2( ts, translation, true_translation, flEpsilon, false, "translation vector" );
|
||||
code = cvtest::cmpEps2( ts, _translation, _true_translation, flEpsilon, false, "translation vector" );
|
||||
if( code < 0 )
|
||||
break;
|
||||
}
|
||||
|
@@ -855,8 +855,8 @@ void CV_InitUndistortRectifyMapTest::prepare_to_validation(int/* test_case_idx*/
|
||||
//Applying precalculated undistort rectify map
|
||||
if (!useCPlus)
|
||||
{
|
||||
mapx = cv::Mat(_mapx);
|
||||
mapy = cv::Mat(_mapy);
|
||||
mapx = cv::cvarrToMat(_mapx);
|
||||
mapy = cv::cvarrToMat(_mapy);
|
||||
}
|
||||
cv::Mat map1,map2;
|
||||
cv::convertMaps(mapx,mapy,map1,map2,CV_32FC1);
|
||||
|
@@ -243,27 +243,27 @@ void CV_UndistortPointsBadArgTest::run(int)
|
||||
//C++ tests
|
||||
useCPlus = true;
|
||||
|
||||
camera_mat = cv::Mat(&_camera_mat_orig);
|
||||
distortion_coeffs = cv::Mat(&_distortion_coeffs_orig);
|
||||
P = cv::Mat(&_P_orig);
|
||||
R = cv::Mat(&_R_orig);
|
||||
src_points = cv::Mat(&_src_points_orig);
|
||||
camera_mat = cv::cvarrToMat(&_camera_mat_orig);
|
||||
distortion_coeffs = cv::cvarrToMat(&_distortion_coeffs_orig);
|
||||
P = cv::cvarrToMat(&_P_orig);
|
||||
R = cv::cvarrToMat(&_R_orig);
|
||||
src_points = cv::cvarrToMat(&_src_points_orig);
|
||||
|
||||
temp = cvCreateMat(2,2,CV_32FC2);
|
||||
src_points = cv::Mat(temp);
|
||||
src_points = cv::cvarrToMat(temp);
|
||||
errcount += run_test_case( CV_StsAssert, "Invalid input data matrix size" );
|
||||
src_points = cv::Mat(&_src_points_orig);
|
||||
src_points = cv::cvarrToMat(&_src_points_orig);
|
||||
cvReleaseMat(&temp);
|
||||
|
||||
temp = cvCreateMat(1,4,CV_64FC2);
|
||||
src_points = cv::Mat(temp);
|
||||
src_points = cv::cvarrToMat(temp);
|
||||
errcount += run_test_case( CV_StsAssert, "Invalid input data matrix type" );
|
||||
src_points = cv::Mat(&_src_points_orig);
|
||||
src_points = cv::cvarrToMat(&_src_points_orig);
|
||||
cvReleaseMat(&temp);
|
||||
|
||||
src_points = cv::Mat();
|
||||
errcount += run_test_case( CV_StsAssert, "Input data matrix is not continuous" );
|
||||
src_points = cv::Mat(&_src_points_orig);
|
||||
src_points = cv::cvarrToMat(&_src_points_orig);
|
||||
cvReleaseMat(&temp);
|
||||
|
||||
|
||||
@@ -360,12 +360,12 @@ void CV_InitUndistortRectifyMapBadArgTest::run(int)
|
||||
//C++ tests
|
||||
useCPlus = true;
|
||||
|
||||
camera_mat = cv::Mat(&_camera_mat_orig);
|
||||
distortion_coeffs = cv::Mat(&_distortion_coeffs_orig);
|
||||
new_camera_mat = cv::Mat(&_new_camera_mat_orig);
|
||||
R = cv::Mat(&_R_orig);
|
||||
mapx = cv::Mat(&_mapx_orig);
|
||||
mapy = cv::Mat(&_mapy_orig);
|
||||
camera_mat = cv::cvarrToMat(&_camera_mat_orig);
|
||||
distortion_coeffs = cv::cvarrToMat(&_distortion_coeffs_orig);
|
||||
new_camera_mat = cv::cvarrToMat(&_new_camera_mat_orig);
|
||||
R = cv::cvarrToMat(&_R_orig);
|
||||
mapx = cv::cvarrToMat(&_mapx_orig);
|
||||
mapy = cv::cvarrToMat(&_mapy_orig);
|
||||
|
||||
|
||||
mat_type = CV_64F;
|
||||
@@ -373,21 +373,21 @@ void CV_InitUndistortRectifyMapBadArgTest::run(int)
|
||||
mat_type = mat_type_orig;
|
||||
|
||||
temp = cvCreateMat(3,2,CV_32FC1);
|
||||
camera_mat = cv::Mat(temp);
|
||||
camera_mat = cv::cvarrToMat(temp);
|
||||
errcount += run_test_case( CV_StsAssert, "Invalid camera data matrix size" );
|
||||
camera_mat = cv::Mat(&_camera_mat_orig);
|
||||
camera_mat = cv::cvarrToMat(&_camera_mat_orig);
|
||||
cvReleaseMat(&temp);
|
||||
|
||||
temp = cvCreateMat(4,3,CV_32FC1);
|
||||
R = cv::Mat(temp);
|
||||
R = cv::cvarrToMat(temp);
|
||||
errcount += run_test_case( CV_StsAssert, "Invalid R data matrix size" );
|
||||
R = cv::Mat(&_R_orig);
|
||||
R = cv::cvarrToMat(&_R_orig);
|
||||
cvReleaseMat(&temp);
|
||||
|
||||
temp = cvCreateMat(6,1,CV_32FC1);
|
||||
distortion_coeffs = cv::Mat(temp);
|
||||
distortion_coeffs = cv::cvarrToMat(temp);
|
||||
errcount += run_test_case( CV_StsAssert, "Invalid distortion coefficients data matrix size" );
|
||||
distortion_coeffs = cv::Mat(&_distortion_coeffs_orig);
|
||||
distortion_coeffs = cv::cvarrToMat(&_distortion_coeffs_orig);
|
||||
cvReleaseMat(&temp);
|
||||
|
||||
//------------
|
||||
@@ -499,11 +499,11 @@ void CV_UndistortBadArgTest::run(int)
|
||||
//C++ tests
|
||||
useCPlus = true;
|
||||
|
||||
camera_mat = cv::Mat(&_camera_mat_orig);
|
||||
distortion_coeffs = cv::Mat(&_distortion_coeffs_orig);
|
||||
new_camera_mat = cv::Mat(&_new_camera_mat_orig);
|
||||
src = cv::Mat(&_src_orig);
|
||||
dst = cv::Mat(&_dst_orig);
|
||||
camera_mat = cv::cvarrToMat(&_camera_mat_orig);
|
||||
distortion_coeffs = cv::cvarrToMat(&_distortion_coeffs_orig);
|
||||
new_camera_mat = cv::cvarrToMat(&_new_camera_mat_orig);
|
||||
src = cv::cvarrToMat(&_src_orig);
|
||||
dst = cv::cvarrToMat(&_dst_orig);
|
||||
|
||||
//------------
|
||||
delete[] arr_src;
|
||||
|
Reference in New Issue
Block a user