domingo, 1 de junio de 2014

Object Detection - Color Filtering - OpenCV - C++

OBJECT DETECTION USING COLOR FILTERING - OPENCV2 - VISUAL STUDIO C++


Hello today I will show an easy method for detecting objects using c++ and OpenCV2:

Limitations of method:
- all object should have only one color
- background should not be composed of objects with the same shape and color as the one we are trying to detect.

Funtions to use:

- cv::VideoCapture
      -.read
- cv::Mat
- cv::namedWindow
- cv::cvtColor
- cv::inRange
- cv::GaussianBlur
- cv::HoughCircles
- cv::circle
- cv::imshow
- cv::waitKey

The ALGORITHM:
please read comments in the code. 

Variables declarations;:


Start Program loop


Showing Results






After Adding trackbars and morphological transformations you can get a better result:





Thanks to: 18F4550videos channel in Youtube

1 comentario: