From af99bee3442328ca7f5e128d6ea61c8b84771e07 Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Sun, 17 Jul 2011 19:23:24 +0000 Subject: [PATCH] adjust cosine threshold in squares.py --- 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 75a18db7ba..32d3c2db63 100644 --- a/samples/python2/squares.py +++ b/samples/python2/squares.py @@ -23,7 +23,7 @@ def find_squares(img): if len(cnt) == 4 and cv2.contourArea(cnt) > 1000 and cv2.isContourConvex(cnt): cnt = cnt.reshape(-1, 2) max_cos = np.max([angle_cos( cnt[i], cnt[(i+1) % 4], cnt[(i+2) % 4] ) for i in xrange(4)]) - if max_cos < 0.3: + if max_cos < 0.1: squares.append(cnt) return squares