projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7bdf83
)
fixed incorrect output of resize(...scalex, scaley, INTER_NEAREST) when scalex and...
author
Vadim Pisarevsky
<no@email>
Fri, 3 Jun 2011 13:25:44 +0000
(13:25 +0000)
committer
Vadim Pisarevsky
<no@email>
Fri, 3 Jun 2011 13:25:44 +0000
(13:25 +0000)
modules/imgproc/src/imgwarp.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/imgwarp.cpp
b/modules/imgproc/src/imgwarp.cpp
index
0a0e788
..
f372cd8
100644
(file)
--- a/
modules/imgproc/src/imgwarp.cpp
+++ b/
modules/imgproc/src/imgwarp.cpp
@@
-253,14
+253,14
@@
resizeNN( const Mat& src, Mat& dst, double fx, double fy )
for( x = 0; x < dsize.width; x++ )
{
- int sx =
saturate_cast<int>
(x*ifx);
+ int sx =
cvFloor
(x*ifx);
x_ofs[x] = std::min(sx, ssize.width-1)*pix_size;
}
for( y = 0; y < dsize.height; y++ )
{
uchar* D = dst.data + dst.step*y;
- int sy = std::min(
saturate_cast<int>
(y*ify), ssize.height-1);
+ int sy = std::min(
cvFloor
(y*ify), ssize.height-1);
const uchar* S = src.data + src.step*sy;
switch( pix_size )