Move cv::Mat out of core.hpp

This commit is contained in:
Andrey Kamaev
2013-03-28 21:01:12 +04:00
parent 135c0b6cb5
commit 715fa3303e
46 changed files with 1854 additions and 1731 deletions

View File

@@ -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;