edgeFeatures {EBImage} | R Documentation

## Extraction of edge profiles and edge features from images of indexed objects

### Description

Edge profile is a distance profile from the geometric center of the object to all its perimeter points calculated by taking the distance at different rotation angles (rotation around the center). The profile is calculated for the rotation angle, theta in `[-pi,pi]`.

### Usage

      ## S4 method for signature 'IndexedImage':
      edgeProfile(x, ref, n=32, fft=TRUE, scale=TRUE, rotate=TRUE, ...)
      ## S4 method for signature 'IndexedImage':
      edgeFeatures(x, ref, ...)

### Arguments

`x` | An object of `IndexedImage`.
`ref` | A reference Grayscale image of the same size as `x`. See details.
`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.
`...` | Reserved.

### Details

The `ref` image can be omitted. However, if supplied it affects the centers of objects and their angles of rotation as in `moments`.

The `edge.features` runs with `n=16` calculating scale and rotation invariant features. From the original distance profile, it returns the measure of object's irregularity taken by calculating the difference between the farthest and the closest to the center edge points. Then it computes the `fft` and returns 4 of it's lowest frequences, corresponding to `2*Pi, 2*Pi/2=Pi, 2*Pi/3` and `2*Pi/4=Pi/2`.

The extracted feature names carry a `e.` prefix to indicate edge features.

### Value

For a single frame, both functions return a matrix of descriptors with objects in rows and ordered profile points (or features) in columns. For image stacks, a list of such matrices.
The matrix columns in `edge.profile` correspond, from left to right, to the equidistant divisions of the range `[-pi,pi]` if `fft` is not used, otherwise to the frequences of angular changes (lower frequences on the left, higher on the right up to the middle of the vector).

### Author(s)

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

### See Also

`IndexedImage, watershed, getFeatures, hullFeatures, moments`

### Examples

      ## see example(getFeatures)

[Package EBImage version 2.4.0 Index]