The link to code is -
In line no 13 of the code, we have written gray_frame in detectMultiScale function. But it is giving colored video stream instead of black and white video stream.
Please explain why are we getting coloured video stream.
The link to code is -
In line no 13 of the code, we have written gray_frame in detectMultiScale function. But it is giving colored video stream instead of black and white video stream.
Please explain why are we getting coloured video stream.
hey @abhaygarg2001 ,
we are just converting the coloured stream to grayscale for better and faster face detection , as soon as we get the coordinates of our faces we make a rectangular box on coloured image frame to just show that as output.
You can see that in : code
for (x,y,w,h) in faces:
cv2.rectangle( frame ,(x,y),(x+w,y+h),(255,0,0),2)
we have used frame , not gray_frame. and hence we are showing this frame only , therefore we get a coloured video stream.