Skip to content Skip to sidebar Skip to footer

Mtcnn_face_detection_alignment Lagging In Ip Camera, Convention Behind Opencv Cv2 Videocapture Frame Matrix

I am just trying to detect and recognize faces from the frame read through CV2 VideoCapture. For detection, using Tensorflow implementation of the face detection / alignment algori

Solution 1:

Your web camera might have first / last few lines empty for some technical reason. You may try to print average colors for every line and see, probably it would end up something like this:

np.mean( frame, axis=(1,2) )
[ 0, 0, 34, 42, .... 75, 129, 0, 0 ]

Solution 2:

consider to do not use all the frames that your recieve from your ip camera like:

_, frame = cap.read()
_, frame = cap.read()
_, frame = cap.read()
processFrame(frame)

or just use a delay to receive not all the frames

Post a Comment for "Mtcnn_face_detection_alignment Lagging In Ip Camera, Convention Behind Opencv Cv2 Videocapture Frame Matrix"