Trybotics Logo

Real Time Face Tracking Robot With Arduino and Matlab

DESCRIPTION

Real time face tracking refers to the task of locating human faces in a video stream and tracking the detected or recognized faces.Nowadays , there are many real world applications of face detection and other image processing techniques.There are many algorithms like Viola Jones , Kanade-Lucas-Tomasi ,camshift etc. that are quite helpful in face detection.

In our project , we made use of some functions (in Matlab) that together make up the Viola-Jones face detection algorithm.We built a robot that tracks the movement of a face from the video stream using Matlab and Arduino.

Description:

  1. Arduino Uno Microcontroller.
  2. Matlab software(R2012b , installed with arduino I/O support package).

  3. Arduino IDE(1.0.6)

  4. Servo Motors x 2.

  5. Usb Webcam (Logitech 720p).

  6. Jumper cables.

Description:

Codes could be found attached in this step.

  1. Firstly , code in Matlab detects a face from every frame of the live video stream and inserts a bounding box around the Region of Interest., which is a face in this case(by detecting some haar features present in the human faces).The project code follows the Viola Jones algorithm for face detection.
  2. The set of frames with bounding boxes make up the addition of a bounding box around the face in live video.While adding a bounding box , we also calculate the coordinates of centroid of the bounding box.

  3. These coordinates are sent as a string to the arduino UNO microcontroller., from Matlab and these are processed according to the code written on arduino IDE for the movement of motors.

  4. During processing , the arduino gets the positions of PAN and TILT servo motors (that are attached as shown in the project image).Then , arduino checks if the centroid coordinates lie in the centre region of the screen. We are trying to move the camera in such a way that the centroid lies at the centre of the frame.(The pan and tilt servos are given to the digital pins 9 and 10 respectively...)

  5. For this reason the frame is divided into left and right halves and also top and bottom halves.If the centroid falls in the left half , the camera is panned right and if it falls in the right half , camera is panned left and the same with the top and bottom halves and tilting.

Attachments


YOU MIGHT ALSO LIKE