Simple Object Detection using OpenCV

Within this workshop, we create an application that is capable of detecting objects and their color using a webcam or any other source of video input. In order to understand and follow the coding parts, some basics about images and pixels, color models, Computer Vision and OpenCV are explained and illustrated beforehand. Furthermore, we will have a look into addons in openFrameworks, commonly referred to as ofxAddons. The addon ofxOpenCv, based on the open source Computer Vision library OpenCV, will provide crucial functionalities for this coding project.

Slides and source code, covering all relevant and required material to complete this workshop, are available online via GitHub: [ Slides ] [ Source code ]

Workshop Outcome

Workshop Content In Detail

  1. Basics: Images and pixels; Color models (RGB, HSV, additive, subtractive); Decimal and hexadecimal representation of colors; Computer Vision; OpenCV
  2. Accessing, reading and drawing video input from a camera
  3. Basic image processing using ofxOpenCv
  4. Detecting objects and visualising them accordingly
  5. Extracting the color of detected objects


  • Completion of the [ openFrameworks introductory workshop ]
  • Nice to have: Understanding of the concept of object-oriented programming (OOP), familiar with C++
, as well as being creative and having a vast imagination of what you want to do.

Helpful Online Resources

last update: November 2016