haralickMatrix            package:EBImage            R Documentation

_C_o-_o_c_c_u_r_r_e_n_c_e _m_a_t_r_i_c_e_s (_G_L_C_M) _a_n_d _H_a_r_a_l_i_c_k _t_e_x_t_u_r_e _f_e_a_t_u_r_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Computes the gray level co-occurrence matrix (GLCM, frequency of
     pixel intensities given the mean intensity of their 4 neighbouring
     pixels) and corresponding Haralick features from image objects.

_U_s_a_g_e:

       haralickFeatures(x, ref, nc = 32)
       haralickMatrix(x, ref, nc = 32)

_A_r_g_u_m_e_n_t_s:

       x: An 'Image' object or an array containing object masks. Object
          masks are sets of pixels with the same unique integer value.

     ref: An 'Image' object or an array, containing the intensity
          values of the objects.

      nc: A numeric value. Specifies the number of gray levels used to
          compute the co-occurrence matrix. Default value is 32.

_D_e_t_a_i_l_s:

     'haralickFeatures' computes the following set of statistics on the
     GLCM matrix:


   '_h._a_s_m' Angular second moment: 'sum[i=1^nc] sum[j=1^nc]p(i,j)^2'.

   '_h._c_o_n' Contrast: 'sum[i=2^(2*nc)] n^2 * sum[i=1^nc] sum[j=1^nc]
        p(i,j), for all i,j s.t ABS(i - j) = n'.

   '_h._c_o_r' Correlation: 'sum[i=1^nc] sum[j=1^nc]((i * j) * p(i,j) -
        mu_x * mu_y) / sigma_x * sigma_y'.

   '_h._v_a_r' Variance: 'sum[i=1^nc] sum[j=1^nc](i - mu)^2. * p(i,j)'.

   '_h._i_d_m' Inverse difference moment: 'sum[i=1^nc] sum[j=1^nc] p(i,j) /
        (1 + (i - j)^2) '.

   '_h._s_a_v' Sum average: 'sum[i=2^(2*nc)] i * Px+y(i)'.

   '_h._s_v_a' Sum variance: 'sum[i=2^(2*nc)] (i - sen)^2 * Px+y(i)'.

   '_h._s_e_n' Sum entropy: '-sum[i=2^(2*nc)] Px+y(i) * log(p(i,j))'.

   '_h._e_n_t' Entropy: '-sum[i=1^nc] sum[j=1^nc] p(i,j) * log( p(i,j) )'.

   '_h._d_v_a' Difference variance: 'sum[i=0^(nc-1)] (i^2) * Px-y(i)'.

   '_h._d_e_n' Difference entropy: 'sum[i=0^(nc-1)] Px-y(i) * log(
        Px-y(i,j) )'.

   '_h._f_1_2' Measure of correlation: 'abs(ent - HXY1) / HX'.

   '_h._f_1_3' Measure of correlation: 'sqrt( 1 - exp(2*(ent - HXY2)))'.

     where:

   '_p' is the GLCM matrix.

   '_P_x(_i)' Marginal frequency. Defined by 'Px(i) = sum[j=1^nc] p(i,j)'.

   '_P_y(_j)' Marginal frequency. Defined by 'Py(j) = sum[i=1^nc] p(i,j)'.

   '_m_u__x, _m_u__y' Means of 'Px' and 'Px'.

   '_s_i_g_m_a__x, _s_i_g_m_a__y' Standard deviations of 'Px' and 'Py'.

   '_P_x+_y' Probability of the co-occurrence matrix coordinates sums to
        'x+y'. Defined by 'Px+y(k) = sum[i=1^nc] sum[j=1^nc] p(i,j), i
        + j = k and k = 2,3,...,2*nc'.

   '_P_x-_y' Probability of the absolute value of the difference between
        co-occurrence matrix cooordinates being equal to 'x-y'. Defined
        by 'Px-y(k) = sum[i=1^nc] sum[j=1^nc] p(i,j), abs(i - j) = k
        and k = 2,3,...,2*nc'.

   '_H_X_Y_1' '-sum[i=1^nc] sum[j=1^nc] p(i,j) * log( Px(i),Py(j))'.

   '_H_X_Y_2' '-sum[i=1^nc] sum[j=1^nc] Px(i)*Py(j) * log( Px(i),Py(j))'.

     Computed Haralick features are rotational invariant and good
     descriptors of object textures.

_V_a_l_u_e:

     'haralickFeatures' returns a matrix (or a list of matrices if 'x'
     contains multiple frames) of features computed of the objects
     present in 'x' and using the intensity values of 'ref'.

     'haralickMatrix' returns an array (or a list of arrays if 'x'
     contains multiple frames) of dimension 'nc*nc*nobj', where 'nobj'
     is the number of objects  in 'x', containing the GLCM values of
     image objects.

_A_u_t_h_o_r(_s):

     Mike Smith, msmith@ebi.ac.uk; Oleg Sklyar, osklyar@ebi.ac.uk, 2007

_R_e_f_e_r_e_n_c_e_s:

     R. M. Haralick, K Shanmugam and Its'Hak Deinstein (1979).
     _Textural Features for Image  Classification_. IEEE Transactions
     on Systems, Man and Cybernetics.

_S_e_e _A_l_s_o:

     'getFeatures', 'zernikeMoments'

_E_x_a_m_p_l_e_s:

       example(getFeatures)

