mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 19:50:38 +08:00
fix for down rounded output sizes
This commit is contained in:
parent
5a41c6509e
commit
aa8fbc26da
@ -1272,11 +1272,14 @@ static void resizeArea_( const Mat& src, Mat& dst, const DecimateAlpha* xofs, in
|
||||
WT beta1 = 1 - beta;
|
||||
T* D = (T*)(dst.data + dst.step*cur_dy);
|
||||
if( fabs(beta) < 1e-3 )
|
||||
{
|
||||
if(cur_dy >= dsize.height) return;
|
||||
for( dx = 0; dx < dsize.width; dx++ )
|
||||
{
|
||||
D[dx] = saturate_cast<T>((sum[dx] + buf[dx]) / min(scale_y, src.cols - cur_dy * scale_y));
|
||||
sum[dx] = buf[dx] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
for( dx = 0; dx < dsize.width; dx++ )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user