From 191e96924360a0c0ccdad50a833ad0f0707bd572 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 12 Mar 2012 16:45:17 +0000 Subject: [PATCH] fixed angle check in squares.py (thanks to Abid Rahman) --- samples/python2/squares.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/python2/squares.py b/samples/python2/squares.py index 32d3c2db63..2194a721a4 100644 --- a/samples/python2/squares.py +++ b/samples/python2/squares.py @@ -3,7 +3,7 @@ import cv2 def angle_cos(p0, p1, p2): - d1, d2 = p0-p1, p2-p1 + d1, d2 = (p0-p1).astype('float'), (p2-p1).astype('float') return abs( np.dot(d1, d2) / np.sqrt( np.dot(d1, d1)*np.dot(d2, d2) ) ) def find_squares(img):