Skip to content

udit01/Arduino-Face-Tracking

 
 

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn


Logo

Arduino Face Tracking.

Redone by me!


View Example · Report Bugs

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contact
  4. Acknowledgements
  5. My Very Janky Concoction
  6. Required Hardware Links

About The Project

This is a modified version of popular circulating face tracking code that I found to not work on python2 or 3, and edited it to actually work for python3 lol!

Getting Started

Software & Hardware Requirements.

Software Required
      Arduino IDE
      Pyhton
      PySerial
      Numpy
      OpenCV
Requirements For The Hardware
      2x Servos
      Pan & Tilt Kit
      Arduino
      Breadboard & Wires
      USB Camera

Installing the software.

  1. Install Python here (During installation you'll be asked if you want the IDLE editor, I'd reccomend getting it for ease of running the python script later!).
  2. Install PySerial, we can do this by openeing command prompt and typing
pip install serial
  1. Install Numpy
pip install numpy
  1. Install openCV
pip install opencv-python
  1. Install the Arduino IDE here!
  2. We're all done with software, now to the hardware! Lets move on to the next section to see how to wire the servos to the Arduino!

How to wire the servos to Arduino.

Schematic (See below if you're confused)

Schematic

Diagram

Diagram (Some servos do need 5v however, such as the continous servo linked here! )

Upload the code the the Arduino

  1. Open Servo.ini using the Arduino IDE
  2. Under Tools-> Select the right Arduino board, and "COM Port", the USB port.

Tools Example

  1. Click the upload button

Upload Button Example

  1. Finished! Now we just have to run the Pyhton code.

Running the Python Code

  1. Open the IDLE editor, should've been installed while installing Python!
  2. Click Run -> Run Module ( Or click F5)

Run Module

  1. You're done! You should now have a working face tracking camera and a pyhton window looking like this!

Face Tracking

My Very Janky Concoction

Inside

Inside

Outside

Outside

Behind

Behind

Bottom

Bottom

Janky Camera Setup LOL

Janky Setup

Contact

Graham - [email protected] Project Link: https://github.com/LanaDelSlay/Arduino-Face-Tracking/

Acknowledgements

Required Hardware Links

About

Arduino Face Tracking For Beginners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.5%
  • C++ 48.5%