Added test of minMaxLoc on filling with maximums of int
This commit is contained in:
parent
344d9fd83f
commit
2bc4486966
@ -1792,7 +1792,6 @@ INSTANTIATE_TEST_CASE_P(Arithm, SubtractOutputMatNotEmpty, testing::Combine(
|
||||
testing::Values(-1, CV_16S, CV_32S, CV_32F),
|
||||
testing::Bool()));
|
||||
|
||||
|
||||
TEST(Core_FindNonZero, singular)
|
||||
{
|
||||
Mat img(10, 10, CV_8U, Scalar::all(0));
|
||||
@ -1816,3 +1815,21 @@ TEST(Core_BoolVector, support)
|
||||
ASSERT_EQ( nz, countNonZero(test) );
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user