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:
e0f40a7
)
Update global_motion.cpp
author
Shai
<shaibagon@gmail.com>
Tue, 10 Jun 2014 14:31:18 +0000
(17:31 +0300)
committer
Shai
<shaibagon@gmail.com>
Tue, 10 Jun 2014 14:31:18 +0000
(17:31 +0300)
An extremely rare case where, for numeric reasons bestM finds more inliers than ninliersMax.
This RARE case causes memory corruption and a nasty seg fault.
modules/videostab/src/global_motion.cpp
patch
|
blob
|
history
diff --git
a/modules/videostab/src/global_motion.cpp
b/modules/videostab/src/global_motion.cpp
index
1fa449e
..
560d7b9
100644
(file)
--- a/
modules/videostab/src/global_motion.cpp
+++ b/
modules/videostab/src/global_motion.cpp
@@
-430,7
+430,7
@@
Mat estimateGlobalMotionRansac(
{
subset0.resize(ninliersMax);
subset1.resize(ninliersMax);
- for (int i = 0, j = 0; i < npoints; ++i)
+ for (int i = 0, j = 0; i < npoints
&& j < ninliersMax
; ++i)
{
p0 = points0_[i];
p1 = points1_[i];