mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Merge pull request #27398 from asmorkalov:as/relax_remap_relative
Relax remap relative test to handle the case when HAL implements not all remap options
This commit is contained in:
commit
a2c381a82b
@ -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) {
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user