Feeds:
Posts
Comments

PCA is an approach used for face recognition and it is also enhanced to work for gender classification and skin detection.

Basic Principles of PCA

To decompose face images into a small set of characteristic feature images called Eigenfaces, which may be thought of as the principal components of the original images. These Eigenfaces function as the orthogonal basis vectors of a linear subspace called Face Space. Recognition is performed by projecting a new face image into this face space and then comparing it position in the face space with those of known faces.

Phases of PCA

A – Initialization
Acquisition of training set of face images and calculation of Eigenfaces.

B – RecognitionGiven an image to be recognized, calculate a set of weights of M Eigenfaces by projecting it onto each of the Eigenfaces. Determine if the face image is a face at all by checking if the image is sufficiently close to the face space. If it is a face, classify the weight pattern as either a known person or as unknown. If the same unknown face is seen several times, Eigenfaces and weight patterns are updated by calculating the new face’s characteristic weight and incorporating into the known faces.

for more info:

http://en.wikipedia.org/wiki/Principal_components_analysis

Background Subtraction is a technique in which background and foreground are segmented so that we can perform our required algorithms (such as face detection, gender classification etc). The basic approach for background subtraction is to store the background image as the reference image, in which there is no movement and then in every other frame subtract the reference image to extract the alien objects in the scene. The alien objects are captured as foreground and these are used for further applications.
Since the background does not always remain constant (mainly because of light changes or continuous movement of leaves) therefore we need to develop an approach in which we update the background continuously so that minute changes in the background are made part of the background. Stauffer & Grimson’s algorithm is one of the most reliable algorithms to facilitate adaptive background subtraction.
Stauffer & Grimson Algorithm
The algorithm models each pixel with a mixture of Gaussians. At every frame, for each pixel, distance of pixel’s color value is calculated from each of the associated K Gaussian distributions. Every new pixel is checked against all existing distributions. The match is the distribution with Mahalanobis distance less than a threshold. The mean and variance of unmatched distributions remain unchanged. The matched distributions are updated by using alpha blending concept. For the unmatched pixel, the lowest weight Gaussian is replaced by the new Gaussian with mean at the new pixel and an initial estimate of covariance matrix. Then we sum up distributions less than some threshold to decide whether the current pixel is part of the background or foreground.
Reference
“Adaptive Background mixture models for real-time tracking” by Chris Stauffer and W.E.L Grimson (The Artificial Intelligence Laboratory, Massachusetts Institute of Technology)
http://www.ai.mit.edu/projects/vsam/
Overview of the algorithm is given at the following link:
http://www-staff.it.uts.edu.au/~massimo/BackgroundSubtractionReview-Piccardi.pdf
The original paper is available at the following link:
http://www.ai.mit.edu/projects/vsam/Publications/stauffer_cvpr98_track.pdf

Dynamic Ellipse Fitting on blobs in an image means placing an elliptical human model on detected foreground to classify either the foreground contains a human or not. First of all, if the blob size(foreground size) is less than some threshold then it is not a human. If it is a human, then we perform this technique to decide either there are more than one person or not. In short, we use dynamic ellipse fitting for Occlussion Removal.

The technique to place a dynamic ellipse is as follow:

Center of Image —> (Xi,Yi)
Center of blob —–> (Xb,Yb)

Angle for the orientation of the ellipse depends upon the distance from the center and also the location of the blob in an image, therefore

Angle————–> 180 – ((arctan((Yb-Yi)/(Xb-Xi)))*180/Pi)

Equation of the ellipse is:
————————-
x^2/a^2 + y^2/b^2 = 1
————————-
this can be expanded to:
(Xb-Xi)^2/Rx^2 + (Yb-Yi)^2/Ry^2 = 1

=> (Xb-Xi)^2*Ry^2 + (Yb-Yi)^2*Rx^2 = Rx^2*Ry^2

where Rx = Wi/hx, Ry = Hi/hy

Wi = width of the image
Hi = height of the image
hx = ??????? (still not finalized)
hy = ??????? (still not finalized)

distance of the blob from the center of an image -> sqRoot((Yb-Yi)^2 + (Xb-Xi)^2)
this thing will be used to adjust the values of hx and hy. In this way a variable length ellipse will be
placed on the blobs in an image.

Animated \An”i*ma`ted\, a. Endowed with life; full of life or spirit; indicating animation; lively; vigorous.

This blog will focus on all coding which is done with complete enthusiasm. I (Rana Hammad) will be sharing here a lot of my coding stuff. I hope my new venture proves to be useful ;)

Happy Animated Coding! ;)

I came across a wonderful series of iPhone Game Programming by 71² and it is outstanding. Source code is also available at the official post. For beginners, this is the series you should probably start with. Thanx 71² team.

iPhone Game Programming – Tutorial 1 from Michael Daley on Vimeo.

Happy iPhone Game Programming ;)

Follow

Get every new post delivered to your Inbox.