Skip to content

caxenie/ip-camera-overhead-tracker

Repository files navigation


	Overhead ip cam tracker 

Basic Installation
==================

The simplest way to install this package is:
	 1. unpack 
		`tar -xvf overhead-tracker-MAJOR.MINOR.tar.gz'.
	 2. `cd' to the directory containing the package's source code.
	 3. Type `make all' to compile the package.
	 4. You can remove the program binaries and object files from the
     	    source code directory by typing `make clean'.

Prerequisites, Compilers and Options
====================================

1. For a fresh install on a system:
	1. OpenCV (>=2.3.1, tested with 2.4.1) with various prerequisites mentioned in the official guide
	    GUIDES: 
			http://opencv.willowgarage.com/wiki/InstallGuide 
			http://www.ozbotz.org/opencv-installation/
	2. gcc
	3. pkg-config

2. For running the application without installing OpenCV and recompiling the source code and libraries:
	1. use the provided static libraries for 32 bit and 64 bit machines along with the pre-compiled binary (WORK IN PROGRESS...)
	2. in order to add changes to the code one must setup the system as described in option 1

Usage
=====
	After compiling the source code there are many options:

	1. Record a stream to a file stored on the disk.

		./cam_track <input_stream> <port> -r

			where <input_stream> can be:
				-  remote stream (e.g. MJPEG, RTSP)
			        -  default option for running without args: local camera
			      <port>: defaults to 56000 but can be set according setup

		e.g.: 
			./cam_track -r 							# record stream from local camera (i.e.: laptop webcam)
			./cam_track http://10.162.242.18/mjpg/video.mjpg 56000  -r 	# record MJPEG stream from IP Cam

	2. Run the tracking algorithm on an input stream (using 2 coloured markers : small radius red+blue circles). 

		./cam_track <input_stream> <port>

		e.g.:
			./cam_track  						# run the tracking algorithm on local camera stream (i.e.: laptop webcam)
			./cam_track http://10.162.242.18/mjpg/video.mjpg 56000	# run the tracking algorithm on MJPEG stream from IP Cam
			./cam_track demo/test-demo-recording.avi		# run the tracking algorithm on a locally saved file (i.e.: demo recording in the demo directory, old runs)

	3. An additional feature is to stream out the data from the tracking algorithm to a remote application connected as a client.
		- currently the tracking applications has a stream server embedded which is able to stream data for clients (at the moment only one)
		- in the current setup the camera is running at 30 FPS and the stream server outputs a new position from the tracker to a client at 25Hz

	Sample algorithm off-line testing:
		
		- run the prerecorded stream:

			./cam_track demo/test-demo-recording.avi
			
	Sample algorithm usage:

		- ensure lights are all on in the room because automatic marker detection is sensitive to illumination; otherwise manual selection is used by default
		- select the 2 markers in the displayed GUI visualizer 
		- the data from running the algorithm and also the recorded stream for off-line processing will be saved in the current directory (source directory)
		- the recorded file will be an MPEG-4 encoded .AVI file at 30FPS using a date and time prefixed name e.g %Y-%m-%d__%H:%M:%S" and a fixed identifier *_cam_tracker_rec.avi 
		- data logged data during the algorithm execution will be saved in a text file using a date and time prefixed name e.g %Y-%m-%d__%H:%M:%S" and a fixed identifier *_overhead_tracker_position
				- the format is 
						TIMESTAMP,XPOS,YPOS,HEADING
						
					where XPOS,YPOS,HEADING are the 2D coordinates and heading
					      TIMESTAMP number of nanos from the epoch (subtraction needed in own code / data alignment with other sources)
		- the tracking data can be observed during runtime by getting the pose information in world space, camera space and heading and also the robot trace in the GUI
				- the format is given as:
					X_POS,Y_POS,x_frame,y_frame,HEADING

Camera connection setup
=======================

	The Axis IP camera in the Robotalab is connected to the local wired network and has a static IP address 10.162.242.18.

Others
======
	The current source tree also contains a minimalistic client software (remote_access_tester) to connect to the stream server and get the data from the tracking application.
	



About

Overhead ip cam tracker (single cam) using OpenCV acquisition and processing of MJPEG/RTSP streams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published