Omnibus commited on
Commit
72ab8e7
β€’
1 Parent(s): ce6d6c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -204,9 +204,14 @@ 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
  p0 = (int(p0[0]),int(p0[1]))
208
  p2 = (int(p2[0]),int(p2[1]))
209
- im[p0, p2] = cv2.GaussianBlur(im[p0, p2] ,(51,51),0)
 
210
  #ROI = image[y:y+h, x:x+w]
211
  #blur = cv2.GaussianBlur(ROI, (51,51), 0)
212
 
 
204
  im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
205
  for bound in bounds:
206
  p0, p1, p2, p3 = bound[0]
207
+ x = int(p0[0])
208
+ y = int(p0[1])
209
+ w = int(p2[0]) - int(x)
210
+ h = int(p2[1]) - int(y)
211
  p0 = (int(p0[0]),int(p0[1]))
212
  p2 = (int(p2[0]),int(p2[1]))
213
+ im[y:y+h, x:x+w] = cv2.GaussianBlur(im[y:y+h, x:x+w])
214
+ #im[p0, p2] = cv2.GaussianBlur(im[p0, p2] ,(51,51),0)
215
  #ROI = image[y:y+h, x:x+w]
216
  #blur = cv2.GaussianBlur(ROI, (51,51), 0)
217