Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -204,12 +204,13 @@ def blur_im(img,bounds):
|
|
204 |
im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
|
205 |
for bound in bounds:
|
206 |
p0, p1, p2, p3 = bound[0]
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
|
|
211 |
|
212 |
-
im[
|
213 |
return im
|
214 |
|
215 |
def draw_boxes(image, bounds, color='blue', width=1):
|
|
|
204 |
im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
|
205 |
for bound in bounds:
|
206 |
p0, p1, p2, p3 = bound[0]
|
207 |
+
|
208 |
+
s0 = (int(p0[0]),int(p0[1]))
|
209 |
+
s1 = (int(p1[0]),int(p1[1]))
|
210 |
+
s2 = (int(p2[0]),int(p2[1]))
|
211 |
+
s3 = (int(p3[0]),int(p3[1]))
|
212 |
|
213 |
+
im[s0, s2] = cv2.blur(im[s0, s2] ,(23,23))
|
214 |
return im
|
215 |
|
216 |
def draw_boxes(image, bounds, color='blue', width=1):
|