I wanted to do something fun this week, so I started looking into using a webcam and facial recognition with pygame to personalize a game with the user's face. In this video, we'll add webcam images to a post-apocalyptic cityscape in the form of a glitching blimp video screen. You'll learn the basics of getting camera images, locating any faces, converting them to a pygame Surface, and adding them to your game.
This channel is suitable for beginners or experienced programmers who want to learn Python, and also for instructors teaching programming. There are also pygame, Java, R, and some microcontroller videos. Let's have some fun learning to program with Python!
You'll want to install an updated version of pip, pygame, opencv-python, and face-recognition. (See what happens when you install those, but you might also need dlib, Pillow, and numpy.)
Here is the OpenCV-Python tutorials page:
docs.opencv.org/4.x/d0/de3/tu...
Here is the OpenCV-Python page:
pypi.org/project/opencv-python/
Here is the face-recognition page:
pypi.org/project/face-recogni...
An example from the face-recognition page that uses OpenCV to read the webcam:
pypi.org/project/face-recogni...
If you're interested in an introductory Python book, my book Problem Solving with Python is here:
ebook:
amzn.to/3oiWwOb
textbook:
www.barnesandnoble.com/w/prob...
If you're interested in an introductory Python/pygame/OOP book, my book Objects and Games with Python is here:
ebook:
www.amazon.com/dp/B0B3V93YG9
textbook:
www.barnesandnoble.com/w/obje...
The github repository with the code examples from this video is here:
github.com/ProfessorBurke/Pyt...
If you want to earn credit for learning to code, take an online course at CCRI!
ccri.edu/comp/
Here is the static sound from Pixabay:
pixabay.com/sound-effects/int...
Here is the low hum sound from Pixabay:
pixabay.com/sound-effects/low...
Негізгі бет Adding the webcam with facial recognition to pygame!
Пікірлер