aashwinik commited on
Commit
1d9e91e
1 Parent(s): a9be9d7

Update Face_Censoring.py

Browse files
Files changed (1) hide show
  1. Face_Censoring.py +4 -3
Face_Censoring.py CHANGED
@@ -32,9 +32,10 @@ def censor_face(filePath):
32
  for (x,y, w, h) in faces: #multiple faces in a video
33
  frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
34
  output.write(frame)
35
- tfile2.write(frame)
36
  success, frame = video.read()
37
 
38
  output.release()
39
-
40
- return tfile2
 
 
32
  for (x,y, w, h) in faces: #multiple faces in a video
33
  frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
34
  output.write(frame)
35
+ #tfile2.write(frame)
36
  success, frame = video.read()
37
 
38
  output.release()
39
+ #video.release()
40
+ result_video = open(tfile2.name, "rb")
41
+ return result_video