
import cv2
import numpy as np
# 加载人脸检测器
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
def login():
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.1, 4)
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (255, 0, 0), 2)
if len(faces) > 0:
print("Login successful!")
break
cv2.imshow('Login', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
login()
]]>
import pandas as pd
# 加载数据
df = pd.read_csv('student_data.csv')
# 数据清洗
df.dropna(inplace=True)
# 描述性统计
print(df.describe())
]]>
本站部分内容及素材来源于互联网,如有侵权,联系必删!



客服经理