edgepoints               package:edci               R Documentation

_E_d_g_e _d_e_t_e_c_t_i_o_n _i_n _n_o_i_s_y _i_m_a_g_e_s

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

     Detection of edgepoints by the difference of two rotated and
     asymmetric Kernel- or M-Kernel-Estimators.

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

       edgepoints(data, h1n, h2n,
                  asteps     = 4,
                  estimator  = "kernel",
                  kernel     = "mean",
                  score      = "gauss",
                  sigma      = 1,
                  kernelfunc = NULL,
                  margin     = FALSE)

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

    data: numerical matrix describing the noisy image.

h1n, h2n: positive numbers. Bandwidth for the kernels.

  asteps: optional positive integer. Number of different angles used.

estimator: optional string. Estimator used within the windows. Possible
          values are:

             *  "kernel": Kernel-Estimators. The used kernel function
                can be choosen by 'kernel'.

             *  "M_mean": M-Kernel-Estimators with mean as starting
                value. The used kernel function can be choosen by
                'kernel', the score function can be choosen by 'score'.

             *  "M_median": M-Kernel-Estimators with median as starting
                value. The used kernel function can be choosen by
                'kernel', the score function can be choosen by 'score'.

             *  "median": Median, what is a special M-Kernel-Estimator.

             *  "test_mean": Multiple Test for equal means in both
                windows for every angle.

             *  "test_median":  Multiple Test for equal means in both
                windows for every angle.

  kernel: optional string. Kernel function if 'estimator="kernel"',
          'estimator="M_mean"', or 'estimator="M_median"'. Possible
          values are:

             *  "mean": Rectangular kernel. With 'estimator="kernel"'
                this gives an ordinary mean estimator. With
                'estimator="M_mean"' or 'estimator="M_median"' this
                gives an M-Estimator.

             *  "linear": Linear kernel function. The distance of the
                observations to the common midpoint of both windows is
                linearly measured.

             *  "linear2": Linear kernel function. The distance of the
                observations to the midpoint of the window they belong
                to is linearly measured.

             *  "gauss": Density of the normal distribution with sd=0.5
                and zero outside [-1,1]x[-1,1].

             *  "func": Arbitrary kernel function given by
                'kernelfunc'.

   score: optional string. Score function for M-Kernel-Estimators if
          'estimator="M_mean"' or 'estimator="M_median"'. Possible
          values are:

             *  "gauss": negativ density of the normal distribution.
                The deviation can be given by parameter 'sigma'.

             *  "huber": The Huber score function is the absolute value
                (median) within an interval [-c,c] and the square
                function (mean) outside this interval. The value of c
                can be given by the parameter 'sigma'.

   sigma: optional positiv number. Parameter for the score function
          '"gauss"' or '"huber"'.

kernelfunc: optional function taking two numbers as arguments and
          returning a positive number. Used as kernelfunction if
          'kernel="func"' is given. Note that the function should be
          zero outside [-1,1]x[-1,1] and that only one function is
          given for both windows. The 'lower' part of the domain, e.g.
          [-1,1]x[-1,0], is used within one window while the 'upper'
          part is used within the other.

  margin: Optional value. Results near the margin are in general not
          very reasonable. Setting 'margin=TRUE' they are calculated
          nevertheless. With 'margin=FALSE' the returned matrices have
          the same dimension as 'data' but the jump heights at the
          margin are set to zero. Setting 'margin="cut"' the retuned
          matrices are cutted down by the margins. The default is
          'margin=FALSE'.

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

     'edgepoints' implements several versions of the RDKE method,
     introduced by Qiu in 1997. The original method, which uses kernel
     estimates, is a generalized version, which uses
     M-Kernel-Estimators, and two test procedures. The test procedures
     are multiple tests for different angles for the hypothesis, that
     there are equal means (or medians) in both windows. All methods
     apply rotating and scaling in the correct order (see Garlipp,
     2004).

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

     Return value is a list of two numerical matrices. The first matrix
     contains the maximal jump height for every pixel, if the choosen
     estimator is not a test procedure, and p-values otherwise. The
     second matrix contains the angle, which leads to the maximal jump
     heigth or minimal p-value.

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

     Tim Garlipp, garlipp@mathematik.uni-oldenburg.de

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

     Garlipp, T. (2004), On Robust Jump Detection in Regression Surface
     with Applications to Image Analysis,
     _Carl-von-Ossietzky-Universitt Oldenburg, Dissertation_

     Qiu, P. (1997), Nonparametric Estimation of Jump Surface, _The
     Indian Journal of Statistics_, 59A, No.2, 268-294.

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

     'eplist'

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

       y <- matrix(rep(0,60*60),nrow=60)
       y[21:40,21:40]<-1
       y <- y + matrix(rnorm(60*60,0,0.2),nrow=60)
       image(y,col=gray(seq(0,1,1/255)))

       ye <- edgepoints(y,0.05,0.05,estimator="M_median",kernel="gauss")
       image(ye[[1]]>0.7,col=gray(c(1,0)))

