Showing posts with label post2. Show all posts
Showing posts with label post2. Show all posts

Wednesday, April 2, 2014

Face Feature Exctraction

Eigenfaces - Eigenfaces or PCA approach is nothing more than the mathematical eigenvectors of the face, applied on the dataset images(training). Each eigenface is a point in high dimensional image space converted into point in eigen subspace. They are  mutually orthogonal vectors. A blog post dedicated to Eigenfaces can be found heresuffer from- luminance and pose variations.


Gabor Wavelets - They are a family of sinosudol waves which work very similar to how our visual cortex perceives images. It works on the principal of kernel convolution, where the kernels are the Gabor Filters[ differing in lambda,theta,phase,etc. ]
strength- They are tailor made to handle cases of partial occlusion and are also pose invariant.
However Gabor Wavelets have a better model, log-Gabor, which is quite the new thing in feature extraction methods available nowadays.


Local Binary Patterns - This technique involves playing with histograms. It is the next big thing after Gabor. They preserve spatial information and locality. Each pixel is threshold ed with its nearest pixels[no. depends on radius of neighbourhood considered]. A bit vector is obtained, which is labelled and stored in a histogram. All the histograms of windows are then concatened to form a feature vector.


Harr Classifiers - They are cascade classifier used for face detection. They are general purpose classifiers which can to trained to detect faces, or even eyes, ears and noses separately.


Sunday, March 23, 2014

Artificial Bee Colony

It is another technique taken from nature, albeit not as simple as the others. This one is modeled around the behavior observed in bees while gathering food/honey from flower patches.

For the algorithm to work efficiently, it relies on a balance between exploration and exploitation.
exploration : expanding the search space to look for new food sources.
exploitation : eating the resources gathered till now.

There are two kinds of bees :
   scouts - they explore the area, going in random directions locally in reach of new flower patches.
   foragers - the bees which exploit the food sources.

When a scout finds a new food patch, it dances to attract new bees to that patch. The other unemployed bees see the dance of the scout bees and decide the flower patch they want to visit.

Taking a look at the algorithm extracted from this pattern:

Scout discovers a point whose value according to objective function is pretty high.It defines it as an abstract flower patch, symbolically centered around the point.
forager bees wander locally in the area defined abstractly as a flower patch.If they find a point in the search area whose value according to objective function is higher that the point discovered by the scout initailly, this forager bee becomes a new scout.

If no forager bee finds such a point , then the flower patch is deemed exhausted.

Wednesday, October 16, 2013

Google Caja post-2

One thing I found about Google Caja while researching was that "It has a very bad documentation! " , atleast for an average guy.

The Way It Works is that the code is first passed onto the Caja Server , where the code is broken down into parse trees.Then the unsafe code is removed and remaining code is again put together so that it now belongs to a safe subset of javascript , i.e Vajita(check up name though, might be wrong name).


I have been working on what a host page template should look like . So far I have come up with something like this

<!-- host page -->
 <!-- where the caja server is -->
<html>
<head>
 <script type="text/javascript" src="www.caja.appspot.com/caja.js">
</script>
</head>

<body>
<p> CAJA HOST </p>
<div id="guest1"> </div>

<script type="text/javascript">
caja.markFunction(/* all those function which you want to provide to guest code */);

var tamedfunction_name = caja.tame(function_name);/*don't know difference between marking and taming */
/*format the url should adhere to */
var uriPolicy = { rewrite : function(uri) { if(true) { return uri; } else return undefined; } };

caja.initialize({ cajaServer:'https://caja.appspot.com/' , debug:true });

/*final guest code runs under div 'guest' */
caja.load( getElelemtById('guest1') , uriPolicy , function(frame) { frame.code('guest1.html','text/html') .api() .run();});
</script>

</body>
</html>