zernikeMoments            package:EBImage            R Documentation

_E_x_t_r_a_c_t_i_o_n _o_f _Z_e_r_n_i_k_e _m_o_m_e_n_t_s _f_r_o_m _i_m_a_g_e_s _o_f _i_n_d_e_x_e_d _o_b_j_e_c_t_s

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

     Extraction of Zernike moments from images of indexed objects

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

       ## S4 method for signature 'IndexedImage, Image':
       zernikeMoments(x, ref, N = 12, R = 30, apply.Gaussian=TRUE, pseudo=FALSE, ...)
       

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

       x: An object of 'IndexedImage'.

     ref: An object of 'Image-class' in the Grayscale mode.

       N: Integer value defining the degree of the Zernike polynomials,
          which in turn defines the number of features calculated.
          Defaults to 12.

       R: Defines the radius of the circle around an object centre from
          which the features are calculated. It also defines the
          standard deviation for the 2D Gausian applied at the centre
          of an object. See details. Defaults to 30. 

apply.Gaussian: A logical value that specifies if a local 2D Gaussian
          modification should be applied to every object at its centre.
          Defaults to 'TRUE'.

  pseudo: Specifies if an alternative algorithm should be used to
          calculate pseudo features. Defaults to 'FALSE'. 

     ...: Reserved. 

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

     Zernike features are calculated as follows:

     'Z_nl = (n+1) / pi * ABS( sum_x,y(V*nl(x,y) * i(x,y)) )',

     '0 <= l <= n, n - l' is even and 'i(x,y)' is the intensity of the
     reference image at the corrdinates '(x,y)' that fall withing a
     circle of radius 'R' from the object's centre. Coordinates taken
     relative to the object's centre. The 'ABS' of the sum gives a real
     value of the complex feature and makes it rotation invariant.

     'V*nl' is a complex conjugate of a Zernike polynomial of degree
     'n' and angular dependence 'l':

     'Vnl(x,y) = Qnl(x,y) * exp(j*l*theta)', where 'j = sqrt(-1),
     theta=atan2(y,x)', and

     'Qnl(x,y) = sum[_m=0^((n-l)/2)] ((-1)^m * (n-m)! * r^(n-2*m)) /
     (m! * ((n-2*m+l)/2)! * ((n-2*m-l)/2)!) ', where 'r =
     sqrt(x^2+y^2)'.

     The extracted features all carry a '"z"'-prefix, for Zernike, and
     have the indexing of the form 'z.0402' where 04 in this is for
     'n=4' and 02 for 'l=2'. The number of differnt 'l'-values is
     calculated automatically from 'N'. For a given 'N' all
     combinations of '(n,l)' are calculated. For the default 'N = 12'
     the resulting number of features is 49. Columns in the results
     matrix are firstly ordered by increasing value of 'n' and secondly
     by increasing value of 'l'.

     If 'apply.Gaussian = TRUE' then prior to calculating the Zernike
     features, a Gaussian is applied to the image centred at the
     co-ordinates of an objects centre of mass, with the standard
     deviation defined by 'sigma = 0.8 * R'. The centres of mass are
     found by using 'moments(x, ref)'. The resulting image is then:

     'i'(x,y) = i(x,y) * exp( -(x^2+y^2) / (2 * sigma^2) )'.

     The expected effect: the default value of 'R = 30' and 'sigma =
     0.8 * R = 24' will penalize the edges of objects of radii more
     than 20 and intensity is expected to be around 0 at distances from
     the centre more than 40.

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

     For a single frame, a matrix of descriptors with objects in rows
     and features in columns. For image stacks, a list of such
     matrices. Frames with no objects will result in 0-populated a
     matrix for 1 object.

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

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

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

     F. Zernike. _Beugungstheorie des Schneidenverfahrens und seiner
     verbesserten Form, der Phasenkontrastmethode (Diffraction theory
     of the cut procedure and its improved form, the phase contrast
     method)_. Physica, 1:pp. 689-704, 1934.

     Jamie Shutler, _Complex Zernike Moments_: <URL:
     http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/SHUTLER3/node11.html>

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

     ' IndexedImage, watershed, getFeatures, moments '

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

       ## see example(getFeatures)

