projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4e1edb
)
expanded the CV_Assert in pyrdown_ to check for empty mats
author
berak
<p4p4p4@web.de>
Tue, 30 Jul 2013 15:32:48 +0000
(17:32 +0200)
committer
berak
<p4p4p4@web.de>
Tue, 30 Jul 2013 15:32:48 +0000
(17:32 +0200)
modules/imgproc/src/pyramids.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/pyramids.cpp
b/modules/imgproc/src/pyramids.cpp
index
e7d315c
..
672e911
100644
(file)
--- a/
modules/imgproc/src/pyramids.cpp
+++ b/
modules/imgproc/src/pyramids.cpp
@@
-203,7
+203,8
@@
pyrDown_( const Mat& _src, Mat& _dst, int borderType )
CastOp castOp;
VecOp vecOp;
- CV_Assert( std::abs(dsize.width*2 - ssize.width) <= 2 &&
+ CV_Assert( ssize.width > 0 && ssize.height > 0 &&
+ std::abs(dsize.width*2 - ssize.width) <= 2 &&
std::abs(dsize.height*2 - ssize.height) <= 2 );
int k, x, sy0 = -PD_SZ/2, sy = sy0, width0 = std::min((ssize.width-PD_SZ/2-1)/2 + 1, dsize.width);