Commit f58c5646 authored by Ilya Lavrenov's avatar Ilya Lavrenov

fixed wrong condition with interpolation types

parent 5ab3fe48
...@@ -1825,9 +1825,12 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize, ...@@ -1825,9 +1825,12 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
// in case of scale_x && scale_y is equal to 2 // in case of scale_x && scale_y is equal to 2
// INTER_AREA (fast) also is equal to INTER_LINEAR // INTER_AREA (fast) also is equal to INTER_LINEAR
if ( interpolation == INTER_LINEAR && if ( interpolation == INTER_LINEAR && std::abs(scale_x - 2.0) < DBL_EPSILON &&
scale_x >= 1 && scale_y >= 1 && is_area_fast) std::abs(scale_y - 2.0) < DBL_EPSILON)
{
interpolation = INTER_AREA; interpolation = INTER_AREA;
is_area_fast = true;
}
// true "area" interpolation is only implemented for the case (scale_x <= 1 && scale_y <= 1). // true "area" interpolation is only implemented for the case (scale_x <= 1 && scale_y <= 1).
// In other cases it is emulated using some variant of bilinear interpolation // In other cases it is emulated using some variant of bilinear interpolation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment