How to Detect and Track Object With OpenCV

This article was last modified on 25 November 2016.

OpenCV is the genius library capable of running everything you do on computer vision. Years ahead of everything else in robotics vision, you always have the latest version of important things like detection and tracking on whatever operating system you want – Linux, Windows, and Mac OS X.

Built on the idea to duplicate the human vision ability, a computer vision system uses electronic parts and algorithms instead eyes and brain. The Open Source Computer Vision Library (OpenCV) is the most used library in robotics to detect, track and understand the surrounding world captured by image sensors.

OpenCV is open-source for everyone who wants to add new functionalities.

Here are the installation guides to make OpenCV running on all the compatible operating systems.

New tutorials and resources:


Probably the best four books about OpenCV:

All these tutorials help you reduce the time on finding the best tutorial to detect and track objects with OpenCV. Because you can use the computer vision library on both computers and mobile devices, below are two lists of tutorials.

Let’s start with the first list:

Detect and Track Objects With OpenCV (computers)

These tutorials introduce you into the detection and tracking objects with OpenCV when you’re using computers.

Tutorials to Detect and Track Objects (mobile devices)

Tons of robotics projects use iOS and Android devices to detect and track objects. All the below tutorials show you how to detect and track objects using mobile devices.

  • OpenCV Tutorial – tutorial to learn how to run the OpenCV on iPhone to process frames captured by the smartphone’s camera.
  • A Complete iOS OpenCV Sample Project – this tutorial shows you how to use the OpenCV library on iPhone with Objective-C to process images. It can be a source of inspiration for robotic projects where an iPhone device is used for control and object detection.
  • Encapsulate OpenCV 3.1 as Android AAR – do you want to solve Sudoku? Here is how to solve Sudoku using your Android smartphone, OpenCV, JavaFX and Scala.
  • Using OpenCV on iPhone – face detection tutorial with OpenCV for iOS smartphone. In this tutorial, you have all the steps available to setup OpenCV as well as use the library for face detection.
  • Tutorial 1: Object Recognition With OpenCV and Android – Overview of Object Recognition – from this tutorial you can learn how to run the OpenCV library on an Android device and start building application for object tracking and detection.
  • Developing OpenCV Computer Vision Apps for the Android Platform – resources to detect a face using Android device and OpenCV4Android. The OpenCV4Android is a custom library with support for Android devices.
  • Get Started with OpenCV on Android – in this tutorial, the author shows you how to use an Android device and the OpenCV library for face detection and tracking.
  • Using the EMGRobotics Robot Controller for Android – this tutorial shows you how to run the EMGRobotics and OpenCV on an Android smartphone to control a robot by face detection and tracking.


This list of resources includes OpenCV documentation, libraries, and compatible tools.

Commerce Content is independent of articles and advertising, and if you buy something through our posts, I may get a small share of the sale.

11 comments » Write a comment

  1. i am thinking of a project for my final year, which is automatic field cleaning robot.
    But i dont know from where to start. First i am thinking of the object detecter. What kind of sensor is suitable for my robot to detect the object and collect it. Can anyone help me please.

    • Hello,

      If you click on tutorials you can easily find what sensor can be used for object detection.

  2. i want to detect a cheese slice and then cut it in a proportion of desired size. please help

  3. this such bullshit,…..cant even follow along cuz the libraries arent installed on my windows8.1

  4. i m developing iOS App , Augmented Reality virtual trial room , how to detect camera a object/image , please give solution

  5. I want to have my webcam pointed at the screen and have it recognise shapes and have it move the cursor to that particular shape. What is that called?

    That’s for starters then I want it to detect advanced shapes off a PS4 screen.
    Can you point me in the right direction.?

  6. Hello everyone, am new in computer vision and I have a project on real-time recognition and tracking of vehicles and I’m using Blob Analysis and Template Matching Algorithm. I need your help for my simulation.

  7. Take the Object Picture and auto crop the image in rectangualr shape, so that it would be easier to compare the similiar images easily

Leave a Reply

Required fields are marked *.