mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Normalize line endings and whitespace
This commit is contained in:
committed by
Andrey Kamaev
parent
69020da607
commit
04384a71e4
@@ -1498,12 +1498,12 @@ TEST(Imgproc_resize_area, regression)
|
||||
|
||||
ASSERT_EQ(actual.type(), expected.type());
|
||||
ASSERT_EQ(actual.size(), expected.size());
|
||||
|
||||
|
||||
Mat diff;
|
||||
absdiff(actual, expected, diff);
|
||||
|
||||
|
||||
Mat one_channel_diff = diff; //.reshape(1);
|
||||
|
||||
|
||||
float elem_diff = 1.0f;
|
||||
Size dsize = actual.size();
|
||||
bool next = true;
|
||||
@@ -1511,25 +1511,25 @@ TEST(Imgproc_resize_area, regression)
|
||||
{
|
||||
ushort* eD = expected.ptr<ushort>(dy);
|
||||
ushort* aD = actual.ptr<ushort>(dy);
|
||||
|
||||
|
||||
for (int dx = 0; dx < dsize.width && next; ++dx)
|
||||
if (fabs(static_cast<float>(aD[dx] - eD[dx])) > elem_diff)
|
||||
{
|
||||
cvtest::TS::ptr()->printf(cvtest::TS::SUMMARY, "Inf norm: %f\n", static_cast<float>(norm(actual, expected, NORM_INF)));
|
||||
cvtest::TS::ptr()->printf(cvtest::TS::SUMMARY, "Error in : (%d, %d)\n", dx, dy);
|
||||
|
||||
|
||||
const int radius = 3;
|
||||
int rmin = MAX(dy - radius, 0), rmax = MIN(dy + radius, dsize.height);
|
||||
int cmin = MAX(dx - radius, 0), cmax = MIN(dx + radius, dsize.width);
|
||||
|
||||
|
||||
std::cout << "Abs diff:" << std::endl << diff << std::endl;
|
||||
std::cout << "actual result:\n" << actual(Range(rmin, rmax), Range(cmin, cmax)) << std::endl;
|
||||
std::cout << "expected result:\n" << expected(Range(rmin, rmax), Range(cmin, cmax)) << std::endl;
|
||||
|
||||
|
||||
next = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ASSERT_EQ(norm(one_channel_diff, cv::NORM_INF), 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user