HSV Pixel Values in OpenCV


HSV color space is more often used in machine vision owing to its superior performance compared to RGB color space in varying illumination levels. Often thresholding and masking is done in HSV color space. So it is very important to know the HSV values of the color which we want to filter out. HSV color space of  OpenCV is a bit complicated than other software programmes like Gimp, Photoshop etc.So  I have written a small python script to grab frames from a camera, and print the HSV value of the pixel under the cursor

Screenshot

Continue reading “HSV Pixel Values in OpenCV”

Create Your Own Haar Classifier for Detecting objects in OpenCV


The steps for training a haar classifier and detecting an object can be divided into :

  • Creating the description file of positive samples
  • Creating the description file of negative samples
  • Packing the positive samples into a vec file
  • Training the classifier
  • Converting the trained cascade into a xml file
  • Using the xml file to detect the object

Let us see all these steps in detail. Continue reading “Create Your Own Haar Classifier for Detecting objects in OpenCV”

OBJECT DETECTION IN OPENCV USING HAARTRAINING


OPENCV is an open source image processing library developed by Intel and currently maintained by WillowGarage. It is very powerful and can be coded in C/C++ or Python. I chose C, as it is more comfortable to me.

Bottle Detection
Bottle Detection

Continue reading “OBJECT DETECTION IN OPENCV USING HAARTRAINING”