• 大小: 4KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-06
  • 语言: Matlab
  • 标签: matlab  代码  

资源简介

灰度共生矩阵matlab代码 灰度共生矩阵matlab代码

资源截图

代码片段和文件信息

function [GLCMSSI] = graycomatrix(varargin)
%GRAYCOMATRIX Create gray-level co-occurrence matrix.
%   GLCMS = GRAYCOMATRIX(I) analyzes pairs of horizontally-adjacent pixels in
%   a scaled version of I.  If I is a binary image it is scaled to 2
%   levels. If I is an intensity image it is scaled to 8 levels. In this
%   case there are 8 x 8 = 64 possible ordered combinations of values for
%   each pixel pair. GRAYCOMATRIX accumulates the total occurrence of each
%   such combination producing a 8-by-8 output array GLCMS. The row and
%   column subscripts in GLCMS correspond respectively to the first and second
%   (scaled) pixel-pair values.
%
%   GLCMS = GRAYCOMATRIX(IPARAM1VALUE1PARAM2VALUE2...) returns one or more
%   gray-level co-occurrence matrices depending on the values of the optional
%   parameter/value pairs. Parameter names can be abbreviated and case does
%   not matter.
%   
%   Parameters include:
%  
%   ‘Offset‘         A p-by-2 array of offsets specifying the distance between
%                    the pixel-of-interest and its neighbor. Each row in the
%                    array is a two-element vector [ROW_OFFSET COL_OFFSET]
%                    that specifies the relationship or ‘Offset‘ between a
%                    pair of pixels. ROW_OFFSET is the number of rows between
%                    the pixel-of-interest and its neighbor.  COL_OFFSET is the
%                    number of columns between the pixel-of-interest and its
%                    neighbor. For example if you want the number of
%                    occurrences where the pixel of interest is one pixel to the
%                    left of its neighbor then [ROW_OFFSET COL_OFFSET] is 
%                    [0 1].
%  
%                    Because this offset is often expressed as an angle the
%                    following table lists the offset values that specify common
%                    angles given the pixel distance D.
%                            
%                    Angle     OFFSET
%                    -----     ------  
%                    0         [0 D]   
%                    45        [-D D]
%                    90        [-D 0]
%                    135       [-D -D]  
%  
%                    ROW_OFFSET and COL_OFFSET must be integers. 
%
%                    Default: [0 1]
%            
%   ‘NumLevels‘      An 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).
%
%                    ‘NumLevels‘ must be an integer. ‘NumLevels‘ must be 2 if I
%                    is logical.
%  
%                    Default: 8 for numeric
%        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      10978  2009-09-24 23:19  灰度共生矩阵matlab代码graycomatrix.m

----------- ---------  ---------- -----  ----

                10978                    1


评论

共有 条评论