|
|
@ -1792,7 +1792,6 @@ INSTANTIATE_TEST_CASE_P(Arithm, SubtractOutputMatNotEmpty, testing::Combine( |
|
|
|
testing::Values(-1, CV_16S, CV_32S, CV_32F), |
|
|
|
testing::Values(-1, CV_16S, CV_32S, CV_32F), |
|
|
|
testing::Bool())); |
|
|
|
testing::Bool())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST(Core_FindNonZero, singular) |
|
|
|
TEST(Core_FindNonZero, singular) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Mat img(10, 10, CV_8U, Scalar::all(0)); |
|
|
|
Mat img(10, 10, CV_8U, Scalar::all(0)); |
|
|
@ -1816,3 +1815,21 @@ TEST(Core_BoolVector, support) |
|
|
|
ASSERT_EQ( nz, countNonZero(test) ); |
|
|
|
ASSERT_EQ( nz, countNonZero(test) ); |
|
|
|
ASSERT_FLOAT_EQ((float)nz/n, (float)(mean(test)[0])); |
|
|
|
ASSERT_FLOAT_EQ((float)nz/n, (float)(mean(test)[0])); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST(MinMaxLoc, Mat_IntMax_Without_Mask) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Mat_<int> mat(50, 50); |
|
|
|
|
|
|
|
int iMaxVal = numeric_limits<int>::max(); |
|
|
|
|
|
|
|
mat.setTo(iMaxVal); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double min, max; |
|
|
|
|
|
|
|
Point minLoc, maxLoc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
minMaxLoc(mat, &min, &max, &minLoc, &maxLoc, Mat()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT_EQ(iMaxVal, min); |
|
|
|
|
|
|
|
ASSERT_EQ(iMaxVal, max); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT_EQ(Point(0, 0), minLoc); |
|
|
|
|
|
|
|
ASSERT_EQ(Point(0, 0), maxLoc); |
|
|
|
|
|
|
|
} |
|
|
|