edgeFeatures {EBImage} | R Documentation

## Extraction of edge profiles and edge features from image objects

### Description

Extract the edge profile from image objects, computing for each object the distances of edge points to the object geometric center, at different rotation angles.

### Usage

      edgeFeatures(x, ref)
      edgeProfile(x, ref, n=32, fft=TRUE, scale=TRUE, rotate=TRUE)

### Arguments

`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.
`n` | An integer value giving the number of angle measures. The full circle of `[-pi,pi]` is divided into `n-1` segments, at which edges the profile is approximated.
`fft` | A logical value. If `TRUE`, the resulting profile is the `fft` transformation of the distance profile giving the frequences of angular changes in shape.
`scale` | A logical value. If `TRUE`, the resulting profile is scaled by the effective radius (calcualted as part of `link{hull.features}`) making the profile scale invariant.
`rotate` | A logical value. If `TRUE`, the resulting profile is shifted by the object's roation angle (calculated from the `moments` on the `ref` image, if provided, and on the hull otherwise.

### Details

`edgeFeatures` returns the following features:

- `e.irr`: difference between the smallest and largest distance profile values.
- `e.f2Pi`: 2pi/1 frequency component of the distance profile.
- `e.fPi`: 2pi/2 frequency component of the distance profile.
- `e.f2Pi3`: 2pi/3 frequency component of the distance profile.
- `e.fPi2`: 2pi/4 frequency component of the distance profile.

### Value

`edgeFeatures` 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`.
`edgeProfile` returns a matrix ((or a list of matrices if `x` contains multiple frames) of profile values, corresponding, from left to right, to the equidistant divisions of the range `[-pi,pi]` if `fft` is `FALSE`. Otherwise, the matrix contains the FFT transform of the corresponding distance profile.

### Author(s)

Oleg Sklyar, osklyar@ebi.ac.uk, 2007

### See Also

`getFeatures`, `ocontour`

### Examples

       example(getFeatures)

[Package EBImage version 3.0.5 Index]