IoT Face Tracking and Recognition

IoT Face Tracking and Recognition © LGPL

IoT WiFi face tracking and recognition for Arduino.

  • 10,212 views
  • 1 comment
  • 24 respects

Components and supplies

Apps and online services

About this project

Introduction

The advancement and development of high resolution per frame cameras in recent years motivate both engineers and students in the research and creation of applications based on "automated" computer vision algorithms, a frequent task used in the tracking of object movements and position, as well as its own characteristics, such as: object shape, object color, etc.

In this case, the project is based on the tracking and recognition of faces. If it detects a face, it focuses it within a red frame. If it recognizes it in a lower percentage, the focus is within a yellow frame, and if the percentage is high or very high, it focuses it within a green frame.

How it works

The functionality of the project, I think, is simple but requires a bit of investigation.

Arduino Micro receives information about the object through a WiFi module, in this case the SparkFun Breakout Board CC3000 from TI. The communication is done through UDP sockets client server: the application in the mobile sends the necessary data (frame size and position for horizontal and vertical servo) to the microcontroller so that this can perform the calculations with the information sent and perform the updates in the servos, in this case only the horizontal.

I hope you enjoy this project and that it serves you a better project or investigative study or whatever you wish.

Code

ATmega32u4_ServoFaceTrackingAndRecognitionC/C++
/*
*	Author		: Zavala Ortiz Vicente Arturo.
*	language	: .ino
*	Date		: Friday April 18 2014.
*	Update		: Friday June  06 2014.
*	Name		: ATmega32u4_ServoObjectTracking.ino
*	Description : Tracks circle coloresd objects
*/
#include <avr/delay.h>

/*		servo libs			*/
#include "_Servo.h"

/*		WiFi libs			*/
#include "CC3000.h"
#include "CC3000_Client.h"
#include "common.h"

Servo servo_x;
Servo servo_y;

void setup()
{
	/* add setup code here */
	ConnectionInfo connection_info;
	
	// Initialize CC3000 (configure SPI communications)
	#ifdef CC3000_DEBUG
		Serial.begin(115200);
	#endif
	
	// Initialize CC3000 (configure SPI communications)
	if(!wifi.init(9)) {
		#ifdef CC3000_DEBUG
		DEBUGPRINTLN(PSTR("Initialize CC3000 FAIL!"));
		#endif
		return;
	}

	else {
		//FreeRam();
		#ifdef CC3000_DEBUG
			DEBUGPRINTLN(PSTR("Initialize CC3000 OK"));
		#endif
	}

	if(!wifi.connect(ap_ssid, ap_security, ap_password, timeout)) 
	{
		#ifdef CC3000_DEBUG
			DEBUGPRINTLN(PSTR("Error: Could not connect to AP!"));
		#endif
	}
	
	
	// Gather connection details and print IP address
	if(!wifi.getConnectionInfo(connection_info) )
	{
		#ifdef CC3000_DEBUG
		DEBUGPRINTLN(PSTR("Error: Could not obtain connection details"));
		#endif
		return;
	}
	
	else
	{
		#ifdef CC3000_DEBUG
		DEBUGPRINT(PSTR("IP Address: "));
		printIPAddr(connection_info.ip_address);
		#endif
	}

	pin_mode(SERVO_PIN_X, OUTPUT);    // declare the LED's pin as output
	pin_mode(SERVO_PIN_Y, OUTPUT);    // declare the LED's pin as output

	servo_x.attach(SERVO_PIN_X);
	servo_y.attach(SERVO_PIN_Y);

	// center servos
	servo_x.write(SERVO_CENTER_X);
	servo_y.write(SERVO_CENTER_Y);

	_delay_ms(200);
}

void loop()
{
	
}

Schematics

basic schematic
Untitled sketch 2 bb zck3stwivs

Comments

Similar projects you might like

IoT Face Tracking and Recognition

Project tutorial by vicente zavala

  • 2,881 views
  • 1 comment
  • 18 respects

IoT Arduino Ball Tracking

by vicente zavala

  • 2,737 views
  • 4 comments
  • 8 respects

IoT Speech Recognition

by vicente zavala

  • 5,686 views
  • 0 comments
  • 14 respects

IoT Arduino Ball Tracking

Project tutorial by vicente zavala

  • 522 views
  • 0 comments
  • 4 respects

IoT Speech Recognition

Project tutorial by vicente zavala

  • 851 views
  • 0 comments
  • 4 respects

IoT Dimmer

Project showcase by vicente zavala

  • 2,425 views
  • 0 comments
  • 6 respects
Add projectSign up / Login