FreeMat: vtkLinkEdgels

FreeMat

- Main Page
- Related Pages

vtkLinkEdgels

Section: Visualization Toolkit Graphics Classes

# Usage

vtkLinkEdgels links edgels into digital curves which are then stored as polylines. The algorithm works one pixel at a time only looking at its immediate neighbors. There is a GradientThreshold that can be set that eliminates any pixels with a smaller gradient value. This can be used as the lower threshold of a two value edgel thresholding.

For the remaining edgels, links are first tried for the four connected neighbors. A successful neighbor will satisfy three tests. First both edgels must be above the gradient threshold. Second, the difference between the orientation between the two edgels (Alpha) and each edgels orientation (Phi) must be less than LinkThreshold. Third, the difference between the two edgels Phi values must be less than PhiThreshold. The most successful link is selected. The measure is simply the sum of the three angle differences (actually stored as the sum of the cosines). If none of the four connect neighbors succeeds, then the eight connect neighbors are examined using the same method.

This filter requires gradient information so you will need to use a vtkImageGradient at some point prior to this filter. Typically a vtkNonMaximumSuppression filter is also used. vtkThresholdEdgels can be used to complete the two value edgel thresholding as used in a Canny edge detector. The vtkSubpixelPositionEdgels filter can also be used after this filter to adjust the edgel locations.

To create an instance of class vtkLinkEdgels, simply invoke its constructor as follows

      obj = vtkLinkEdgels

# Methods

The class vtkLinkEdgels has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkLinkEdgels class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkLinkEdgels = obj.NewInstance ()`
- `vtkLinkEdgels = obj.SafeDownCast (vtkObject o)`
- `obj.SetLinkThreshold (double )` - Set/Get the threshold for Phi vs. Alpha link thresholding.
- `double = obj.GetLinkThreshold ()` - Set/Get the threshold for Phi vs. Alpha link thresholding.
- `obj.SetPhiThreshold (double )` - Set/get the threshold for Phi vs. Phi link thresholding.
- `double = obj.GetPhiThreshold ()` - Set/get the threshold for Phi vs. Phi link thresholding.
- `obj.SetGradientThreshold (double )` - Set/Get the threshold for image gradient thresholding.
- `double = obj.GetGradientThreshold ()` - Set/Get the threshold for image gradient thresholding.