Code covered by the BSD License  

Highlights from
Gray Level Run Length Matrix Toolbox

3.77778

3.8 | 12 ratings Rate this file 38 Downloads (last 30 days) File Size: 9.55 KB File ID: #17482

Gray Level Run Length Matrix Toolbox

by

 

12 Nov 2007 (Updated )

The toolbox provide useful functions for extract high order run length features

| Watch this File

File Information
Description

This toolbox provides several state of the art high order run length matrix statistics for image analysis.

Currently supported features are:

1. 0,45,90,135 direction run-length matrix
2. Fully vectorized coding style
3. Inputs checking using MATLAB style
4. 11 various statistics include:Short Run Emphasis, Long Run Emphasis, Gray-Level Nonuniformity, Run Length Nonuniformity, Run Percentage, Low Gray-Level Run Emphasis, High Gray-Level Run Emphasis, Short Run Low Gray-Level Emphasis, Short Run High Gray-Level Emphasis,Long Run Low Gray-Level Emphasis ,Long Run High Gray-Level Emphasis.

 Files include: grayrlmatrix, grayrlprops,and some utility functions

 Importance Notice: You can freely use the source files for academic research purpose at your own risk.For commercial use, you should consult with the author for conditions.

Citation:
If you use them for your academic research work,please kindly cite this toolbox as:
Xunkai Wei, Gray Level Run Length Matrix Toolbox v1.0,Software,Beijing Aeronautical Technology Research Center, 2007 http://www.mathworks.com/matlabcentral/fileexchange/download.do?objectId=17482&fn=RunLengthMatrixToolboxver1.0&fe=.zip&cid=1101680

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Other requirements Tested under environment: Window XP SP2, MATLAB 7.5
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (18)
19 Nov 2014 thomas

few changes todo in the inputparser, if you have only one parameter it should be included in a cell to success at the parser, but in the main function you treat a single parameter as a matrix ...

17 Nov 2014 thomas

Thank you for this usefull functions,
i have just 2 "objections" :
- be carefull of iptcheckinput, it will disapear (maybe replace it by validateattribute, and use inputparser matlab object)
- why dont use the standards or graycomatrix (only one direction as output, no cell array, struct for the stats, offset as a direction vector)

17 Nov 2014 thomas  
16 Nov 2014 Phu Pham Quoc

Dear Xunkai Wei
Thank you a lot for your useful source code. It helps me so much in my programs.
I am just confused that whether it has some mistakes in the calculation of SRE and LRE.
%1. Short Run Emphasis (SRE)
SRE = sum(p_r./(c_vector.^2))/N_runs;
% 2. Long Run Emphasis (LRE)
LRE = sum(p_r.*(c_vector.^2))/N_runs;
I think we should use p_g instead of p_r ?

27 May 2014 sanu mn  
04 Jun 2013 Narender

Nice

27 Feb 2013 Subha

Can anyone say how to normalize this GLRL matrix....

20 Feb 2013 Subha

yeah we can take the average of features from 4 directions.. and atlast will have 11*1 matrix...

18 Feb 2013 fazli

Now I can run the code. Very simple. Thanks a lot

But I do not really understand, how can we combined all features from different direction. (After extracting the features, we will get 11 features from 4 direction. Is it possible to combine the features from each direction. This means the output will be 11x1 matrix only)

17 Feb 2013 Subha  
17 Feb 2013 Subha

Nice toolbox.. works well.. thank you sir..

i=imread('img.jpg');
I=rgb2gray(RGB);
[GLRLM,SI]= grayrlmatrix(I,'OFFSET',[1;2;3;4],'NumLevels',8,'G',[]);
stats = grayrlprops(GLRLM,{'SRE','LRE','GLN','RLN','RP','LGRE','HGRE','SRLGE','SRHGE','LRLGE','LRHGE'})

....
i've used in this way is this correct????
1. hw to normalize the runlength matrix?? where and hw to add the command ?
...

15 Feb 2013 fazli

Hi

I am new in matlab and image processing
Where can I start using this code

Hope can help
Tq

29 Jul 2009 Nicolas Cusseau

Interesting code !
I was looking for statistics on run length and it's a good starting point.
But you don't mention Stefan Eireiner and use its code even if there are other ways to compute run length which are best for the memory than cell arrays.

22 May 2008 Chen-Yi Lee

Good!

30 Apr 2008 Daniel Jake

Thank you for sharing this excellent code:)

26 Feb 2008 yue feng

Thx for this great toolbox!

03 Feb 2008 Anas To'meh

I try to use the package, but it did not work.
matlab msg:
Corrupt P-file "D:\matlab\run-length matrix\Mymatlab\grayrlmatrix.p".

Error in ==> test at 6
GLRLMS = GRAYRLMATRIX(m,'Offset',1,'NumLevels',8,'G',[]);

Please update the package with running grayrlmatrix.p file

12 Nov 2007 xunkai wei

Please mind problems of this version,I have fixed several key bugs. A new version will be issued soon.Please keep an eye on it.

Updates
15 Nov 2007

Bug fixed version
It issued wrong outputs when handling nonsquare matrix. Now We output cell matrix instead of multi-dimensional matrix.

Contact us