![]() ![]() Use rectangle to mark the frame for the faceĬv2.rectangle(img,, , ) Xy is the coordinate of the upper left corner, w is the width, and h is the height. Framed face, for loop ensures a real-time dynamic video stream that can be detected Where gray is the grayscale image to be detected, 1.3 is the proportion of each image size reduction, and 5 is minNeighborsįaces := face_tectMultiScale(gray, 1.3, 5) Detect the face, bring the data recorded by each camera frame into OpenCv, and let the Classifier judge the face Gray := cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) Convert to grayscale image to reduce program compliance and improve recognition SampleNum is used to count the number of samples ![]() 'haarcascade_frontalface_default.xml') To be changedįace_id := input('`n User data input,Look at the camera and wait. Call the face classifier and adjust it according to the actual path ![]() If there are other cameras, the parameter can be adjusted to 1,2 Call the built-in camera of the notebook, and the parameter is 0. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |