
There are three subroutines: Densitymfs.m, Momentmfs.m mfsALL.m.

a)Densitymfs.m: estimates the MFS vector for a gray-value image using generic algorithm.

parameters: ite_num -> The number of levels for computing the level set
            ind_num -> The number of levels for computing the density  
            f_num----> The dimension of initial MFS estimation.

b)Momentmfs.m estimates the MFS vector for a gray-value image using moment-based algorithm

parameters: ite_num --> The number of levels for computing the moment statistics.

b)mfsALL.m: estimates the combined MFS vector, which is composed of three types: Dtensity, gradients and laplacian.
            Each MFS vector is computed using Densitymfs.m




Example:

%Compute the MFS for a given image "exposed_brickwork.jpg'

im = imread ('exposed_brickwork.jpg');
im = rgb2gray(im);
[MFS, ALPHA] = Densitymfs(im);  %%%%%% computes a single MFS vector based on Density
plot(MFS);

%To compute the combined MFS vectors  
im1 = imread ('exposed_brickwork.jpg');
MFSA1 =mfsALL(im1,8,30);   %%%%% computes a vector consisting of three MFS vectors (Density(Intensity), Derivatives, Laplacian)
plot([1:30],MFSA1(1:30), 'r',[1:30], MFSA1(31:60),'g',[1:30],MFSA1(61:90), 'b');

% To compute the MFS of the density(intensity) using the moment-based algorithm;
[MFS, ALPHA] = Momentmfs(im,ite_num);
plot(MFS);


