in matlab ordfilt2 () function

Summary:

  ordfilt2 filter is a two-dimensional data, according to the first filter window non-zero elements of the matrix elements of the target sorting, and (specified by the parameters) in place of a large element of the original data values ​​wherein K, and thus the process through each element of the target matrix.

First, the application of three forms ordfilt2

  1、B = ordfilt2(A, order, domain);

    The domain size of the filter window, each element Input taken on the same region domain size of the elements in order to replace the original pixel value, (note: 0 domain positions corresponding to the elements do not participate in sorting);

  2、B = ordfilt2(A, order, domain, S);

    S - Additive offsets, i.e. additional offset. For each position on an element region domain in the same size, if the value of the position of the corresponding domain is not zero, then the value S in the corresponding position plus position, then the corresponding filter calculation.

  3、B = ordfilt2(A, order, domain, S,padopt);

    padopt - Padding option, used to specify how to expand the boundaries.

Second, the parameters introduced

  1, A - Input Marix (input matrix)

   A is a two-dimensional, non-sparse matrix.

  2、order — Element to replace the target pixel

   A value specified for an element, the use of several elements in its neighborhood to replace the value of this element.

  3、domain — Neighborhood

  DESCRIPTION filter window size, position of elements of the domain of the zero indicates that the location is not within the window filter.

 

  

  4, S - Additive offsets, additional offset.

  For each position on an element region domain in the same size, if the value of the position of the corresponding domain is not zero, then the value S in the corresponding position plus position, then the corresponding filter calculation.

 

   5、padopt —— Padding option

  It is used to indicate how to expand the boundaries

    0 by default to expand the boundary, 'symmetric' shows the image fill.

 

Guess you like

Origin www.cnblogs.com/LGJC1314/p/11934534.html