You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name = str(input("Enter your Name : "))
Roll_Number = int(input("Enter your Roll_Number : "))
dataset = 'dataset'
sub_data = Name
path = os.path.join(dataset, sub_data)
if not os.path.isdir(path):
os.mkdir(path)
print(sub_data)
info = [str(Name), str(Roll_Number)]
with open('student.csv', 'a') as csvFile:
write = csv.writer(csvFile)
write.writerow(info)
csvFile.close()
print("Starting video stream...")
cam = cv2.VideoCapture(1)
time.sleep(2.0)
total = 0
import imutils
import time
import cv2
import csv
import os
cascade = 'haarcascade_frontalface_default.xml'
detector = cv2.CascadeClassifier(cascade)
Name = str(input("Enter your Name : "))
Roll_Number = int(input("Enter your Roll_Number : "))
dataset = 'dataset'
sub_data = Name
path = os.path.join(dataset, sub_data)
if not os.path.isdir(path):
os.mkdir(path)
print(sub_data)
info = [str(Name), str(Roll_Number)]
with open('student.csv', 'a') as csvFile:
write = csv.writer(csvFile)
write.writerow(info)
csvFile.close()
print("Starting video stream...")
cam = cv2.VideoCapture(1)
time.sleep(2.0)
total = 0
while total < 50:
print(total)
_, frame = cam.read()
img = imutils.resize(frame, width=400)
rects = detector.detectMultiScale(
cv2.cvtColor(img, cv2.COLOR_BGR2GRAY), scaleFactor=1.1,
minNeighbors=5, minSize=(30, 30))
cam.release()
cv2.destroyAllWindows()
The text was updated successfully, but these errors were encountered: