mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -174,7 +174,6 @@ bool Core_EigenTest::check_pair_count(const cv::Mat& src, const cv::Mat& evalues
|
||||
std::cout << "Number of rows: " << evalues.rows << " Number of cols: " << evalues.cols << endl;
|
||||
std::cout << "Size of src symmetric matrix: " << src.rows << " * " << src.cols << endl; std::cout << endl;
|
||||
CV_Error(CORE_EIGEN_ERROR_COUNT, MESSAGE_ERROR_COUNT);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -190,7 +189,6 @@ bool Core_EigenTest::check_pair_count(const cv::Mat& src, const cv::Mat& evalues
|
||||
std::cout << "Number of rows: " << evectors.rows << " Number of cols: " << evectors.cols << endl;
|
||||
std:: cout << "Size of src symmetric matrix: " << src.rows << " * " << src.cols << endl; std::cout << endl;
|
||||
CV_Error (CORE_EIGEN_ERROR_SIZE, MESSAGE_ERROR_SIZE);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(evalues.rows == right_eigen_pair_count && evalues.cols == 1))
|
||||
@@ -199,7 +197,6 @@ bool Core_EigenTest::check_pair_count(const cv::Mat& src, const cv::Mat& evalues
|
||||
std::cout << "Number of rows: " << evalues.rows << " Number of cols: " << evalues.cols << endl;
|
||||
std:: cout << "Size of src symmetric matrix: " << src.rows << " * " << src.cols << endl; std::cout << endl;
|
||||
CV_Error (CORE_EIGEN_ERROR_COUNT, MESSAGE_ERROR_COUNT);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -237,7 +234,6 @@ bool Core_EigenTest::check_orthogonality(const cv::Mat& U)
|
||||
std::cout << endl; std::cout << "Checking orthogonality of matrix " << U << ": ";
|
||||
print_information(i, U, diff, eps_vec);
|
||||
CV_Error(CORE_EIGEN_ERROR_ORTHO, MESSAGE_ERROR_ORTHO);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +253,6 @@ bool Core_EigenTest::check_pairs_order(const cv::Mat& eigen_values)
|
||||
std::cout << "Pair of indexes with non descending of eigen values: (" << i << ", " << i+1 << ")." << endl;
|
||||
std::cout << endl;
|
||||
CV_Error(CORE_EIGEN_ERROR_ORDER, MESSAGE_ERROR_ORDER);
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -272,7 +267,6 @@ bool Core_EigenTest::check_pairs_order(const cv::Mat& eigen_values)
|
||||
std::cout << "Pair of indexes with non descending of eigen values: (" << i << ", " << i+1 << ")." << endl;
|
||||
std::cout << endl;
|
||||
CV_Error(CORE_EIGEN_ERROR_ORDER, "Eigen values are not sorted in descending order.");
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -331,7 +325,6 @@ bool Core_EigenTest::test_pairs(const cv::Mat& src)
|
||||
std::cout << endl; std::cout << "Checking accuracy of eigen vectors computing for matrix " << src << ": ";
|
||||
print_information(i, src, diff, eps_vec);
|
||||
CV_Error(CORE_EIGEN_ERROR_DIFF, MESSAGE_ERROR_DIFF_2);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,7 +353,6 @@ bool Core_EigenTest::test_values(const cv::Mat& src)
|
||||
std::cout << endl; std::cout << "Checking accuracy of eigen values computing for matrix " << src << ": ";
|
||||
print_information(i, src, diff, eps_val);
|
||||
CV_Error(CORE_EIGEN_ERROR_DIFF, MESSAGE_ERROR_DIFF_1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -657,8 +657,15 @@ template<typename R> struct TheTest
|
||||
|
||||
TheTest & test_mask()
|
||||
{
|
||||
Data<R> dataA, dataB, dataC, dataD(1), dataE(2);
|
||||
typedef V_TypeTraits<LaneType> Traits;
|
||||
typedef typename Traits::int_type int_type;
|
||||
|
||||
Data<R> dataA, dataB(0), dataC, dataD(1), dataE(2);
|
||||
dataA[1] *= (LaneType)-1;
|
||||
const LaneType mask_one = Traits::reinterpret_from_int(~(typename Traits::uint_type)(0));
|
||||
dataB[1] = mask_one;
|
||||
dataB[R::nlanes / 2] = mask_one;
|
||||
dataB[R::nlanes - 1] = mask_one;
|
||||
dataC *= (LaneType)-1;
|
||||
R a = dataA, b = dataB, c = dataC, d = dataD, e = dataE;
|
||||
|
||||
@@ -670,12 +677,9 @@ template<typename R> struct TheTest
|
||||
EXPECT_EQ(true, v_check_all(c));
|
||||
|
||||
EXPECT_EQ(true, v_check_any(a));
|
||||
EXPECT_EQ(false, v_check_any(b));
|
||||
EXPECT_EQ(true, v_check_any(b));
|
||||
EXPECT_EQ(true, v_check_any(c));
|
||||
|
||||
typedef V_TypeTraits<LaneType> Traits;
|
||||
typedef typename Traits::int_type int_type;
|
||||
|
||||
R f = v_select(b, d, e);
|
||||
Data<R> resF = f;
|
||||
for (int i = 0; i < R::nlanes; ++i)
|
||||
|
||||
Reference in New Issue
Block a user