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:
da6898f
)
Fix HoughLines crashes (Bug #3959).
author
Yan Wang
<yan.wang@linux.intel.com>
Thu, 6 Nov 2014 04:46:04 +0000
(12:46 +0800)
committer
Yan Wang
<yan.wang@linux.intel.com>
Fri, 7 Nov 2014 09:52:16 +0000
(17:52 +0800)
Avoid phi exceed PI/2 to get the negative value of cos(phi).
modules/imgproc/src/hough.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/hough.cpp
b/modules/imgproc/src/hough.cpp
index
88482b4
..
f7c0efc
100644
(file)
--- a/
modules/imgproc/src/hough.cpp
+++ b/
modules/imgproc/src/hough.cpp
@@
-303,7
+303,7
@@
HoughLinesSDiv( const Mat& img,
ti1 < halftn; ti1++, phi += theta_it, phi1 += scale_factor )
{
rv = r0 * std::cos( phi );
- i =
cvFloor( rv )
* tn;
+ i =
(int)rv
* tn;
i += cvFloor( phi1 );
assert( i >= 0 );
assert( i < rn * tn );