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:
603e3e4
)
fixed angle check in squares.py (thanks to Abid Rahman)
author
Vadim Pisarevsky
<no@email>
Mon, 12 Mar 2012 16:45:17 +0000
(16:45 +0000)
committer
Vadim Pisarevsky
<no@email>
Mon, 12 Mar 2012 16:45:17 +0000
(16:45 +0000)
samples/python2/squares.py
patch
|
blob
|
history
diff --git
a/samples/python2/squares.py
b/samples/python2/squares.py
index
32d3c2d
..
2194a72
100644
(file)
--- a/
samples/python2/squares.py
+++ b/
samples/python2/squares.py
@@
-3,7
+3,7
@@
import cv2
\r
\r
def angle_cos(p0, p1, p2):
\r
- d1, d2 =
p0-p1, p2-p1
\r
+ d1, d2 =
(p0-p1).astype('float'), (p2-p1).astype('float')
\r
return abs( np.dot(d1, d2) / np.sqrt( np.dot(d1, d1)*np.dot(d2, d2) ) )
\r
\r
def find_squares(img):
\r