Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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,
|
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)
|