To clarify please run this script:
A = repmat(0:255, 256, 1);
[GLCM2, B] = graycomatrix(A,'Offset',[1 0],'G',[0,255]);
figure;plot(A(:), B(:), '*');
figure;imagesc(A);colorbar
figure;imagesc(B);colorbar

What this does is generates a 256 x 256 image that contains gray levels from 0 to 255 in all rows. Then I plot the input versus output plot. Hopefully this will clarify any doubts on the GLCM outputs levels. You probably have already gone through the definitions of 'GrayLimits' and 'NumLevels' which are the parameters that control the output levels.

'GrayLimits'

Two-element vector, [low high], that specifies how the grayscale values in I are linearly scaled into gray levels. Grayscale values less than or equal to low are scaled to 1. Grayscale values greater than or equal tohigh are scaled to NumLevels. If graylimits is set to [], graycomatrix uses the minimum and maximum grayscale values in the image as limits,[min(I(:)) max(I(:))].

Minimum and maximum specified by class, e.g.
double [0 1]
int16[-32768 32767]

'NumLevels'

Integer specifying the number of gray-levels to use when scaling the grayscale values in I. For example, if NumLevels is 8, graycomatrix scales the values in I so they are integers between 1 and 8. The number of gray-levels determines the size of the gray-level co-occurrence matrix (glcm).

The number of sets of outputs will depend on the number of GLCMs input into the function for both graycoprops() and GLCM_features().

In using GLCM_features() please note the function of the 'pairs' flag as explained in the intro. Also make sure how your version of graycomatrix() works with regards to the 'Symmetric' flag.

"Haralick uses 'Symmetric' = true in computing the glcm. There is no Symmetric flag in the Matlab version I use hence I add the diagonally opposite pairs to obtain the Haralick glcm. Here it is assumed that the diagonally opposite orientations are paired one after the other in the matrix. If the above assumption is true with respect to the input glcm then setting the flag 'pairs' to 1 will compute the final glcms that would result by setting 'Symmetric' to true. If your glcm is computed using the
Matlab version with 'Symmetric' flag you can set the flag 'pairs' to 0".

Sorry about the delay in response but I have uploaded code to calculate the Precision(class), Sensitivity(class), Specificity(class) and the overall accuracy of model ( along with TP, TN, FN, FP) from the confusion matrix.

"I am working on MRI of brain for my Ph.D. now I am using your GLCM_Features4 program for feature extraction, but I can not understant this GLCM_Features4 program calculate 22 feature or 44 feature."

The output is a structure called 'out' which has 22 features for each of the GLCMs that are input. The function takes multiple GLCMs as input. Please go through the description for the program and let me know if further explanation is needed.

"when I was passing MRI img to this it will give 2 values that belong to 22 feature or 44. like contrast = 22.22 33.33. tell me this is 2 diff feature or same only for contrast."

Please note that the function does NOT take images as input rather it takes GLCMS ( calculated using a function like graycomatrix() ) as input. And depending on the number of GLCMs there are so main sets of 22 features. So for n GLCMs you will have n sets of 22 features as output.

"to this GLCM program, I gave the tumor segmented image as input. Was I correct?"

Please make sure that you are giving the GLCM(s) as input to the GLCM_Features function. ( You can use help graycomatrix to know more on how to input your image into this matlab function ).

Please go through the initial description on this page and in the code and if there is still a problem please do get back.

Thank u for the code,but it is giving me this error which is persisting although i have suppilied the limit within its recursionlimit :
"Error using validatestring (line 61) Maximum recursion limit of 500 reached.Be aware that exceeding your available stack space can crash MATLAB and/or your computer."

I am using GLCM features in image processing application,
would you please to ask you if there is ability to convert to VHDL and how to write test script for it.

Avinash i have been trying to reach you! I am sai kiran thati. I am currently using your code in my research to extract features from GLCM. i posted a question. Can you please read it and answer for me? I think you are the only guy who can help me out in this.
http://www.mathworks.com/matlabcentral/answers/135000-how-to-decide-the-pixel-distance-gray-levels-and-orientation-angle-before-calculating-glcm-from-gr

Thank you for this codes but I have a question about Inverse Difference Normalized and Inverse Difference Moment Normalized, could someone tell me in which reference are mentioned these two equations?

Thank u for the code,but it is giving me this error which is persisting although i have suppilied the limit within its recursionlimit :
"Error using validatestring (line 61) Maximum recursion limit of 500 reached.Be aware that exceeding your available stack space can crash MATLAB and/or your computer."

I am using GLCM features in image processing application,
would you please to ask you if there is ability to convert to VHDL and how to write test script for it.

Hmmm....
det(A) = pi^2 / area^2,
so it seems the optimization for minimum area is to maximize, rather than minimize, log(det(A)).
Also, for small d, it may be easier to obtain semi major/minor lengths (a, b) by finding the eigenvalues/vectors of A (eigenvalues are 1/a^2, 1/b^2, etc, rotation matrix columns are the eigenvectors).
I'm finding this algorithm gives me det(A) < 0 (a hyperbola) for some point sets. Also, A should be invariant under translation of all the input points (which should just result in a translation of c), but I find it is quite sensitive.

Avinash i have been trying to reach you! I am sai kiran thati. I am currently using your code in my research to extract features from GLCM. i posted a question. Can you please read it and answer for me? I think you are the only guy who can help me out in this.
http://www.mathworks.com/matlabcentral/answers/135000-how-to-decide-the-pixel-distance-gray-levels-and-orientation-angle-before-calculating-glcm-from-gr

Comment only