I have a homework ask me using mahalanobis.m to calculate the mahalanobis distance of a color in an image. themahalanobis.m comes from DIPUM(gonzalez), it is easy to find on google.
the homework is i have a color and know its rgb(like: [150 97 210]), now i need to calculate its mahalanobis distance of a rgb image. the professor give us a matlab function: mahalanobis.m and this is part of the code and easy to find on google.
function d = mahalanobis(varargin)
the problem is I don't know how to use this function. I don't know what is X and Y, how to use my image and the color to find X and Y