mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
set to linear interpolation type for upscaling with area interplation flag
This commit is contained in:
parent
75eedf8b03
commit
16ef01efda
@ -88,7 +88,7 @@ INSTANTIATE_TEST_CASE_P(ImgProc, Resize, testing::Combine(
|
||||
MatType(CV_32FC1), MatType(CV_32FC3), MatType(CV_32FC4)),
|
||||
testing::Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR),
|
||||
Interpolation(cv::INTER_CUBIC), Interpolation(cv::INTER_AREA)),
|
||||
testing::Values(Scale(0.5), Scale(0.3)/*, Scale(2.0)*/)));
|
||||
testing::Values(Scale(0.5), Scale(0.3), Scale(2.0))));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// WarpAffine
|
||||
|
@ -78,7 +78,7 @@ INSTANTIATE_TEST_CASE_P(ImgProc, Resize, testing::Combine(
|
||||
MatType(CV_32FC1), MatType(CV_32FC3), MatType(CV_32FC4)),
|
||||
testing::Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR),
|
||||
Interpolation(cv::INTER_CUBIC), Interpolation(cv::INTER_AREA)),
|
||||
testing::Values(Scale(0.5), Scale(0.3)/*, Scale(2.0)*/)));
|
||||
testing::Values(Scale(0.5), Scale(0.3), Scale(2.0))));
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// WarpAffine
|
||||
|
@ -241,6 +241,9 @@ namespace cv { namespace gpu { namespace device
|
||||
ResizeDispatcher<CubicFilter, T>::call,
|
||||
ResizeDispatcher<AreaFilter, T>::call
|
||||
};
|
||||
// chenge to linear if area interpolation upscaling
|
||||
if (interpolation == 3 && (fx <= 1.f || fy <= 1.f))
|
||||
interpolation = 1;
|
||||
|
||||
callers[interpolation](static_cast< DevMem2D_<T> >(src), static_cast< DevMem2D_<T> >(srcWhole), xoff, yoff, fx, fy,
|
||||
static_cast< DevMem2D_<T> >(dst), stream);
|
||||
|
Loading…
Reference in New Issue
Block a user