aashwinik commited on
Commit
caff417
1 Parent(s): c23ae71

Update Face_Censoring.py

Browse files
Files changed (1) hide show
  1. Face_Censoring.py +4 -4
Face_Censoring.py CHANGED
@@ -17,15 +17,15 @@ def censor_face(filePath):
17
  height = frame.shape[0]
18
  width = frame.shape[1]
19
 
20
- st.write(height, width)
21
 
22
- gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
23
- st.write("Gray: " + str(gray))
24
 
25
  output=cv2.VideoWriter(output_file, cv2.VideoWriter_fourcc(*'mp4v'), 30, (width, height))
26
 
27
  while success:
28
- faces = face_cascade.detectMultiScale(gray, 1.1, 4)
29
  for (x,y, w, h) in faces: #multiple faces in a video
30
  frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
31
  output.write(frame)
 
17
  height = frame.shape[0]
18
  width = frame.shape[1]
19
 
20
+ #st.write(height, width)
21
 
22
+ #gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
23
+ st.write("Frame: " + str(frame))
24
 
25
  output=cv2.VideoWriter(output_file, cv2.VideoWriter_fourcc(*'mp4v'), 30, (width, height))
26
 
27
  while success:
28
+ faces = face_cascade.detectMultiScale(frame, 1.1, 4)
29
  for (x,y, w, h) in faces: #multiple faces in a video
30
  frame[y:y+h, x:x+w] = cv2.blur(frame[y:y+h, x:x+w], (150, 150))
31
  output.write(frame)