Skip to main content

Posts

Showing posts with the label haar

Nose Tracking using Kalman Filter and Viola and Jones Classifier

class atsKalman { public:     atsKalman()     {         KalmanFilter KF(4, 2, 0);         Mat_<float> state(4, 1); /* (x, y, Vx, Vy) */         Mat processNoise(4, 1, CV_32F);         Mat_<float> measurement(2,1);         measurement.setTo(Scalar(0));         KFs = KF;         measurements = measurement;     }     void setKalman(int x, int y)     {         KFs.statePre.at<float>(0) = x;         KFs.statePre.at<float>(1) = y;         KFs.statePre.at<float>(2) = 0;         KFs.statePre.at<float>(3) = 0;       ...

build a cascade of boosted classifiers based on Haar-like features

Step 1 - Tools Needed: You can find these executables as part of the opencv default installation. they are located in the BIN folder Samples: you should have alot of positive and negative images. Take note that compressed images such as jpeg have certain issues therefore selecting a BMP image is recommended. Create folders for the Negative and Positive images and include an info file aswell Basically there should be four sets of images that you work on: - a positive sample set representing your object that you want to train - another positive sample set for testing purpose - a negative sample set (or so-called backgrounds) for training - and another negative sample set for testing, too so your 2 folders containing the images are: /opencv/project/negative /opencv/project/positive as well as the info file: -train.txt -test.txt To work with these images in the utilities, a list of the files is needed. Using Win32 as host OS, you can get the list via command promt...