Orientation histogram
There are numerous ways one can describe an image. You can use color histograms for example to describe the general colors of an image. You create a histogram with a X-number of bins and sample the colors of each pixel, calculate into which bin it belongs and count how many times a color is stored in a particular bin. This works amazingly well and is used by i.e. Google Image search when you want to fetch images with a particular color. Another solution is to create orientation histograms. An orientation histogram calculates the gradient for each pixel in the image and and stores the angle of the gradient into bins. Recently I launched my 1.000.000 faces project. I'm collecting/indexing 1.000.000 faces with the help of "you". So what can you do with these faces? .... exactly! You can sort them by color or orientation histogram :) I spent some time this evening to figure out how to create these orientation histograms and how these look like for particular images. I noticed that this can be a good solution for detecting clean images with just a face and a regular background (w/o any texture or noise).
Test application created using openFrameworks


This is still work in progress... I found some wierd round-off error when creating the histograms. I'll share my code when it works as it's supposed to.