How to Detect and Track Object With OpenCV

The detection of an object by a robot is a job in the machine vision system. Based on the idea to duplicate the human vision ability, a computer vision system use electronic parts and algorithms instead eyes and brain. The Open Source Computer Vision Library (OpenCV) is the most used libraries in robotics to detect, track and understand the surrounding world captured by image sensors.

OpenCV is an open-source library opened to everyone who wants to develop and add new functionalities. It can be downloaded and installed on Ubuntu, Windows or OS X operating systems. Installation guide with steps and setup is available here.



OpenCV is compatible with next compilers:

  • Ubuntu: GCC 4.4.3 (Ubuntu 10.04), GCC 4.6 (Ubuntu 11.10), GCC 4.6.3(Ubuntu 12.04);
  • Windows: MSVC 2008, 2010, MinGW 4.5.1 x64, 4.6 x86;
  • MacOS: GCC 4.2.1 ;

In order to get started using OpenCV, I made an overview of tutorials and resources focused on OpenCV library.

Detect and Track Objects With OpenCV

In the following, I made an overview of tutorials and guides to introduce you to the world of the OpenCV library for detection and tracking objects. OpenCV is a library for computer visions designed to analyze, process and understand the objects in videos and photos aiming to produce information.

  • OpenCV Tutorials – a comprehensive list of basic OpenCV tutorials and source code based on the OpenCV library;
  • Object Detection & Tracking Using Color – an example of an application where OpenCV is used to detect objects based on color differences;
  • Face Detection Using OpenCV – guide how to use OpenCV to detect one or more faces from the same image;
  • SURF in OpenCV – tutorial how to use SURF algorithm designed to detect key-points and descriptors in images;
  • Introduction to Face Detection and Face Recognition – face detection and recognition are two of the most common applications in computer vision in robotics, and this tutorial present the steps how a face is detected and recognized from images;
  • Find Objects with a Webcam – using a simple webcam mounted on a robot and the Simple Qt interface designed to work with OpenCV, you can detect and track any object captured by the camera;
  • Features 2D + Homography to Find a Known Object – tutorial with programming code and explanation in order to use two important functions included in OpenCV. These two functions – findHomography and perspectiveTransform – are used to find objects in images. The findHomography is a function based on a technique called Key-point Matching while the perspectiveTransform is an advanced class capable of mapping the points from an image;
  • Back Projection – tutorial based on calcBackProject function designed to calculate the back project of the histogram;
  • OpenCV Tutorials – Based on “Learning OpenCV – Computer Vision with the OpenCV Library” – in order to become familiar with computer vision concepts, these tutorials can be useful for the beginner and advanced users to start building applications or to improve the skills;
  • Image Processing on Pandaboard using OpenCV and Kinect – in this presentation you can find information about image processing with a Pandaboard single board computer using the Kinect sensor and the OpenCV library;
  • Video Capture using OpenCV with VC++ – OpenCV library can be integrated with Visual Studio, and this article explains you as a programmer how to use the Visual C++ together with OpenCV;

Tutorials to Detect and Track Objects with Mobile Devices

iOS or Android mobile devices such as smartphones and tablets can be integrated into robots and used to detect and track objects. Below, I made an overview of tutorials that explains you how to detect and track objects using different mobile devices.


Below is a list of resources including OpenCV documentation, libraries, and OpenCV compatible tools.

This article was last modified on 14 April 2014.


7 Responses

  1. caezar carrera 3 years ago
  2. satish aryal 2 years ago
    • Dragos George Calin 2 years ago
  3. abdul 2 years ago
  4. Vivek Soni 2 weeks ago
  5. Frank 4 days ago

Add Comment