Introduction - If you have any usage issues, please Google them yourself
Pattern Recognition bayes discriminant analysis algorithm, Using matlab to calculate the Mahalanobis distance for the image, Sampling a priori probability, calculate the weight.