Join Patrick W. Crawford for an in-depth discussion in this video Solution: Eye detection, part of OpenCV for Python Developers.
- Now let's take a look at the solution to this challenge.…As a reminder, we are tasked with drawing circles…around all the eyes in an image.…To do this, we're going to use the Haar Cascade Method…using the provided haarcascade_eye.xml file.…Similar to the face train file,…this is pre-trained data around detecting eyes in images.…Additionally we're going to try and reduce the number…of false positives and false negatives as much as possible.…Now let's take a look at the chapter four…module six pre-included Python file.…In here, we see that we already have our faces loaded in…and have read in in full color.…
Next let's convert to gray using gray = cv2.cvtColor…then passing in image, then cv2.COLOR_BGR2GRAY.…Then we'll set our path to be our xml file,…typing path = haarcascade_eye.xml.…Next we'll create our eye_cascade…object = cv2.Cascade, capitalized,…Classifier, also capitalized, then pass in our path.…
Then we're going to create our eyes output.…Eyes = eye_cascade.detectMultiScale…where the M and S are capitalized.…
AuthorPatrick W. Crawford
- Installing and configuring OpenCV
- Data types and structures
- Image types
- Manipulating pixels
- Scaling and rotating images
- Using video inputs
- Creating custom interfaces
- Object detection
- Face and feature detection
- Template matching
Skill Level Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
Python: Programming Efficientlywith Michele Vallisneri2h 15m Intermediate
1. Install and Configure OpenCV
2. Basic Image Operations
3. Object Detection
4. Face and Feature Detection
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.