Monday 22 July 2013

How to create an OpenCv projcet in visual studio 2010

We need to take following steps to do this:-

1)Create a windows 32 console application project.
2)We need to add following dependencies to the project properties->configuration properties->linker->input->Additonal dependencies

opencv_core220d.lib;opencv_highgui220d.lib;opencv_imgproc220d.lib;opencv_legacy220d.lib;opencv_ml220d.lib;opencv_video220d.lib;




3)We need to add following directories to the project properties->C/C++ ->general->Additional include directories

C:\OpenCV2.2\include;C:\OpenCV2.2\include\opencv;





4)We need to add "C:\OpenCV2.2\lib" directory to the project properties->configuration properties->linker->input->Additonal library directories

C:\OpenCV2.2\lib

Wednesday 10 July 2013

Face Detection algos

Algos of Face detection

PCA:
·      Principal Component Analysis is a mathematical procedure that uses an orthogonal transformation to convert a set of observations of possibly correlated variables into a set of values of linearly uncorrelated variables called principal components.

Eigenface:
·         Eigenfaces are a set of eigenvectors.
·         Averaging each grayscale image in database pixel by pixel.
·         Database subtracts the average image from it.
·         Eigenvectors are formed to the column vector and brought together in one matrix (covariance matrix)

EP (Evolutionary Pursuit):
·         Eigenspace-based adaptive approach that searches for the best set of projection axes in order to maximize a fitness function, measuring at the same time the classification accuracy and generalization ability of the system.

AdaBoost + Haar cascade (Viola-Jones):
·         Haar(square wave output in mathematics) cascade (series of Haar Like features)
·         f(i)= sum(Ri,white)-sum(Rj,black)
Ri (white part of Haar rect.) and Rj (black part of Haar rect.) are the selected region of the selected image pixels.
if f(i)>thershold,1
if f(i)<threshold,-1
·         AdaBoost combines all weak classifiers into a strong classifier for matching the features.
·         s(A)+s(D)-s(B)-s(C)=i(x,y)
Here A, B, C, D are pixels of image.

Gabor jets (EBGM):
·         Faces are represented as graphs, with nodes positioned at fiducial points,(eyes, nose, ends of mouth) and edges labeled with 2-D distance vectors.
·      Node contains a set of 40 complex Gabor wavelet coefficients at different scales and orientations (phase, amplitude) and is called "jets".
·         Recognition is based on set of nodes connected by edges, nodes are labeled with jets, and edges are labeled with distances.

Kernel SVM:
·         Eigenface and fisher methods aim to find projection directions in 2nd order, whereas kernel provides higher order correlations.

LDA:
·         It finds the vectors in the underlying space that best discriminate among classes.

Trace Transform:
·         Generalizations of the Radon transform.
·         Tool for image processing which can be used for recognizing objects under transformations, e.g. rotation, translation and scaling.

Fisher faces:
·         This method for facial recognition is less sensitive to variation in lighting and pose of the face than the method using eigenfaces.

Active appearance model:

·         It decouples the face's shape from its texture: it does an eigenface decomposition of the face after warping it to mean shape. This allows it to perform better on different projections of the face, and when the face is tilted.