Linear Discriminant Analysis with OpenCV

There was a question on stackoverflow on:

So I wrote a class to perform a Linear Discriminant Analysis with OpenCV, which is available at: