Re: Performing computation of distance Mahalanobis



I found that it exists in Matlab a fonction for computing directly the distance of Mahalanobis.


I discovered myself in Statistic Toolbox the Mahalanobis distance.

doc mahal

I want to compute the Mahalanobis distance for a big rgb image. But first I resized my image. The distance mahalanobis has 2 parameters the first is the matrix associated for my image in this case is J and the second is a parameter that performs computation of distance Mahalanobis for each line of my matrix. I don't know how tu use computation of mahal function the mathematical principe I understood and it's presented in my description.


What have I done in command window:

I=imread('poza1.jpg');imshow(I);
whos I
Name Size Bytes Class

I 960x1280x3 3686400 uint8 array
J=imresize(I, [100 100])

whos J
Name Size Bytes Class

J 100x100x3 30000 uint8 array

mahal(J,X)

And I want that in parameter X performs me the distance Mahalanobis for each line of my matrix so in X I want to be stored 100 values which represents the distance Mahalanobis for each line of my matrix.

I want your response with this!

I'm stuck using : >>doc mahal
.


Quantcast