Relax remap relative test to handle the case when HAL implements not remap options.

This commit is contained in:
Alexander Smorkalov 2025-06-03 11:24:07 +03:00
parent 17d94277f0
commit 0ccbd21c0a
2 changed files with 5 additions and 5 deletions

View File

@ -500,10 +500,10 @@ PARAM_TEST_CASE(RemapRelative, MatDepth, Channels, Interpolation, BorderType, bo
data64FC1.reshape(nChannels, size.height).convertTo(src, srcType);
cv::Mat mapRelativeX32F(size, CV_32FC1);
mapRelativeX32F.setTo(cv::Scalar::all(-0.33));
mapRelativeX32F.setTo(cv::Scalar::all(-0.25));
cv::Mat mapRelativeY32F(size, CV_32FC1);
mapRelativeY32F.setTo(cv::Scalar::all(-0.33));
mapRelativeY32F.setTo(cv::Scalar::all(-0.25));
cv::Mat mapAbsoluteX32F = mapRelativeX32F.clone();
mapAbsoluteX32F.forEach<float>([&](float& pixel, const int* position) {

View File

@ -1332,10 +1332,10 @@ TEST_P(Imgproc_RemapRelative, validity)
data64FC1.reshape(nChannels, size.height).convertTo(src, srcType);
cv::Mat mapRelativeX32F(size, CV_32FC1);
mapRelativeX32F.setTo(cv::Scalar::all(-0.33));
mapRelativeX32F.setTo(cv::Scalar::all(-0.25));
cv::Mat mapRelativeY32F(size, CV_32FC1);
mapRelativeY32F.setTo(cv::Scalar::all(-0.33));
mapRelativeY32F.setTo(cv::Scalar::all(-0.25));
cv::Mat mapAbsoluteX32F = mapRelativeX32F.clone();
mapAbsoluteX32F.forEach<float>([&](float& pixel, const int* position) {
@ -1371,7 +1371,7 @@ TEST_P(Imgproc_RemapRelative, validity)
cv::remap(src, dstRelative, mapRelativeX32F, mapRelativeY32F, interpolation | WARP_RELATIVE_MAP, borderType);
}
EXPECT_EQ(cvtest::norm(dstAbsolute, dstRelative, NORM_INF), 0);
EXPECT_LE(cvtest::norm(dstAbsolute, dstRelative, NORM_INF), 1);
};
INSTANTIATE_TEST_CASE_P(ImgProc, Imgproc_RemapRelative, testing::Combine(