ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

AIML Full Course Day 19 | Artificial Intelligence & Machine Learning Course

Face Detection

OpenCV Python

Haar Cascade

AI Nepal

AIML Course

Python AI

CodeKarma Nepal

Computer Vision

Python Project

Face Recognition

Python OpenCV

Real Time AI

AI Project

ML Project

Webcam Face Detection

CV Python

AI Learning

Python Coding

AI Tutorial

ML Nepal

AI Code

Python Course

AI Beginner

Python Practice

Deep Learning Basics

aiml

AIML

code

codekarma

codekarmanepal

Code Karma Nepal

Nepal code

coding

coding nepal

karma

Code Karma

Ai

Ml

Автор: CodeKarmaNepal

Загружено: 2025-08-27

Просмотров: 24

Описание: 📌 Welcome to Day 19 of our Best Artificial Intelligence & Machine Learning Course by CodeKarma Nepal!
In today’s session, we dive into one of the most exciting applications of Computer Vision – Face Detection using OpenCV with Haar Cascade Classifiers.

🔍 What You Will Learn in This Video:

✅ Introduction to Face Detection
✅ Understanding Haar Cascade Classifier in OpenCV
✅ How to use pre-trained XML files for face detection
✅ Capturing video from Webcam using OpenCV
✅ Converting frames to Grayscale for detection
✅ Using detectMultiScale() function to detect faces
✅ Drawing bounding boxes around detected faces
✅ Breaking the loop with a keyboard event (‘q’ key)

---

🖥 Code Used in This Video:

import cv2 as cv

Load pre-trained Haar Cascade Classifier for face detection
face_cascade = cv.CascadeClassifier(cv.data.haarcascades + 'haarcascade_frontalface_default.xml')

Start webcam
cap = cv.VideoCapture(0)

while True:
tr, frame = cap.read()

Convert frame to grayscale
gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)

Detect faces
faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5)

Draw rectangle around detected faces
for (x, y, w, h) in faces:
cv.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2)
cv.imshow("Face Detection", frame)

Exit on pressing 'q'
if cv.waitKey(1) & 0xFF == ord("q"):
break

Release resources
cap.release()
cv.destroyAllWindows()

---

📝 Key Points:

Haar Cascades are machine learning object detection algorithms used to identify objects in images/video.

Pre-trained models like haarcascade_frontalface_default.xml make face detection easier.

Real-time face detection is achieved by continuously reading frames from the webcam.

---

🎯 Assignment for You:

👉 Modify the code to:

1. Detect multiple faces and display the total count of faces.


2. Try different Haar Cascade files like haarcascade_eye.xml or haarcascade_smile.xml.

---

📢 Stay Connected:

📺 Don’t forget to Like, Share, and Subscribe to CodeKarma Nepal for more exciting lessons in Artificial Intelligence and Machine Learning!
🔔 Hit the bell icon so you never miss an update.

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
AIML Full Course Day 19 | Artificial Intelligence & Machine Learning Course

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]