This repository contains the source code for simulations of tracking an object in a distributed camera network using OpenCV library.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
img
lib
other
py
results
screenshots
README.md

README.md

Object tracking Using Distributed camera Network

The following module will try to craete a distributed netowrk of devices and track objects.

Version

1.0.0

Requirements

  • Python - networking and image processing language used to interaface
  • OpenCV - The Image porcessing Library
  • Numpy - Math Library for Python
  • Scipy - Visualization Tool used
  • matplotlib - Visualization tool
  • virtualenv - environment setup for clean run

Installation on Mac

  1. Install Homebrew
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. install latest Python 2.7
$ brew install python
  1. install virtualenv
$ pip isnstall virtualenv
  1. Setup virtual Environment at the path <workspace>
$ virtualenv <workspace>
  1. Activate virtualenv
$ source <workspace>/bin/acitvate
  1. install opencv
$ brew install opencv
  1. install Numpy
$ brew install numpy
  1. install SciPy
$ brew install scipy
  1. Clone this repository
$ git clone https://github.com/ashriths/img-proc

Installation on Debian (Use yum for centOS or other distros )

  1. Update apt package manager
$ sudo apt-get update
  1. install virtualenv
$ pip isnstall virtualenv
  1. Setup virtual Environment at the path <workspace>
$ virtualenv <workspace>
  1. Activate virtualenv
$ source <workspace>/bin/acitvate
  1. install opencv
$ sudo apt-get install opencv
  1. install Numpy
$ sudo apt-get install numpy
  1. install SciPy
$ sudo apt-get install scipy
  1. Clone this repository
$ git clone https://github.com/ashriths/img-proc

How to run ?

  1. All objects to be tracked should be put in <workspace>/img-proc/img directory before running. Check out the demo images. The file name will be taken as the name of the object. Eg. match.jpg => Name : match alt tag
  2. Connect the devices to a single network and note down their IP addresses
  3. Open <workspace>/img-proc/lib/network_generator.py and <workspace>/img-proc/lib/node_generator.py to modify the IP to your IP network Admin's and node's IP address respectively
IP = '<your IP Address>'
  1. Run the Netowork Admin on one of the devices to setup the network
$ <workspace>/img-proc python netowork.py
[1] to start
[2] to exit

Press 1 to start the network and you should see this

Server created on <YOUR IP ADDRESS> listening to port 5000
  1. Run the Node script in a new terminal or another device
$ <workspace>/img-proc python node.py
Enter Network IP: <Enter Your Netowork Admin's IP here>
Enter Network PORT: <Enter your Network Admin's Port here, usually 5000>
Enter Location:
x : <X coordinate of the node's geolocation>
y : <Y coordinate of the node's geolocation>
[1] to start
[2] to exit

press 1 to start the node tracking and you'll see the tracking like this alt tag

  1. To generate the report of tracking
$ <workspace>/img-proc python report.py
Enter File_name: <leave empty to analyze default>
Enter Object Name: <id,match etc>

You should see the report like this. alt tag

Todo's

  • Write Tests
  • Night Mode

License

Free