fffiloni commited on
Commit
a9852e7
1 Parent(s): 0039eca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -48,7 +48,7 @@ def infer(image_in):
48
  contours, hierarchy = cv2.findContours(preprocess(img), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
49
 
50
  for cnt in contours:
51
- peri = cv2.arcLength(cnt, False)
52
  approx = cv2.approxPolyDP(cnt, 0.02 * peri, True)
53
  hull = cv2.convexHull(approx, returnPoints=False)
54
  sides = len(hull)
 
48
  contours, hierarchy = cv2.findContours(preprocess(img), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
49
 
50
  for cnt in contours:
51
+ peri = cv2.arcLength(cnt, True)
52
  approx = cv2.approxPolyDP(cnt, 0.02 * peri, True)
53
  hull = cv2.convexHull(approx, returnPoints=False)
54
  sides = len(hull)