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:
88c934e
)
Fixed assert placement in cv::invert
author
Andrey Kamaev
<no@email>
Wed, 23 May 2012 09:28:26 +0000
(09:28 +0000)
committer
Andrey Kamaev
<no@email>
Wed, 23 May 2012 09:28:26 +0000
(09:28 +0000)
modules/core/src/lapack.cpp
patch
|
blob
|
history
diff --git
a/modules/core/src/lapack.cpp
b/modules/core/src/lapack.cpp
index
4122b82
..
12ad278
100644
(file)
--- a/
modules/core/src/lapack.cpp
+++ b/
modules/core/src/lapack.cpp
@@
-947,6
+947,9
@@
double cv::invert( InputArray _src, OutputArray _dst, int method )
bool result = false;
Mat src = _src.getMat();
int type = src.type();
+
+ CV_Assert(type == CV_32F || type == CV_64F);
+
size_t esz = CV_ELEM_SIZE(type);
int m = src.rows, n = src.cols;
@@
-969,7
+972,7
@@
double cv::invert( InputArray _src, OutputArray _dst, int method )
((double*)w.data)[n-1]/((double*)w.data)[0] : 0);
}
- CV_Assert( m == n
&& (type == CV_32F || type == CV_64F)
);
+ CV_Assert( m == n );
if( method == DECOMP_EIG )
{