Extract subpixel precise color edges using Deriche, Shen, or Canny filters.
edges_color_sub_pix extracts subpixel precise color edges from the input image Image. The definition of color edges is given in the description of edges_color. The same edge filters as in edges_color can be selected: 'canny', 'deriche1', 'deriche2', and 'shen'. They are specified by the parameter Filter.
The ``filter width'' (i.e., the amount of smoothing) can be chosen arbitrarily. For a detailed description of this parameter see edges_color.
The extracted edges are returned as subpixel precise XLD contours in Edges. For each edge point the following attributes are defined (see get_contour_attrib_xld):
'edge_direction': Edge direction
'angle': Direction of the normal vectors to the
contour (oriented such that the normal
vectors point to the right side of the
contour as the contour is traversed from
start to end point; the angles are given
with respect to the row axis of the
image.)
'response': Edge amplitude (color gradient magnitude)
edges_color_sub_pix links the edge points into edges by using an algorithm similar to a hysteresis threshold operation, which is also used in edges_sub_pix and lines_gauss. Points with an amplitude larger than High are immediately accepted as belonging to an edge, while points with an amplitude smaller than Low are rejected. All other points are accepted as edges if they are connected to accepted edge points (see also lines_gauss and hysteresis_threshold).
Because edge extractors are often unable to extract certain junctions, a mode that tries to extract these missing junctions by different means can be selected by appending '_junctions' to the values of Filter that are described above. This mode is analogous to the mode for completing junctions that is available in edges_sub_pix and lines_gauss.
|
Image (input_object) |
(multichannel-)image -> object : byte / uint2 |
| Input image. | |
|
Edges (output_object) |
xld_cont-array -> object |
| Extracted edges. | |
|
Filter (input_control) |
string -> string |
| Edge operator to be applied. | |
| Default value: 'canny' | |
| List of values: 'canny', 'deriche1', 'deriche2', 'shen', 'canny_junctions', 'deriche1_junctions', 'deriche2_junctions', 'shen_junctions' | |
|
Alpha (input_control) |
real -> real |
| Filter parameter: small values result in strong smoothing, and thus less detail (opposite for 'canny'). | |
| Default value: 1.0 | |
| Suggested values: 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.9, 1.0, 1.1, 1.2, 1.5, 2.0, 2.5, 3.0 | |
| Typical range of values: 0.7 <= Alpha <= 50.0 | |
| Minimum increment: 0.01 | |
|
Recommended increment: 0.1 | |
| Restriction: Alpha > 0.0 | |
|
Low (input_control) |
number -> real / integer |
| Lower threshold for the hysteresis threshold operation. | |
| Default value: 20 | |
| Suggested values: 5, 10, 15, 20, 25, 30, 40 | |
| Typical range of values: 1 <= Low | |
| Minimum increment: 1 | |
|
Recommended increment: 5 | |
| Restriction: Low > 0 | |
|
High (input_control) |
number -> real / integer |
| Upper threshold for the hysteresis threshold operation. | |
| Default value: 40 | |
| Suggested values: 10, 15, 20, 25, 30, 40, 50, 60, 70 | |
| Typical range of values: 1 <= High | |
| Minimum increment: 1 | |
|
Recommended increment: 5 | |
| Restriction: (High > 0) && (High >= Low) | |
edges_color_sub_pix returns 2 (H_MSG_TRUE) if all parameters are correct and no error occurs during execution. If the input is empty the behavior can be set via set_system('no_object_result',<Result>). If necessary, an exception handling is raised.
edges_color_sub_pix is reentrant and processed without parallelization.
edges_image, edges_sub_pix, info_edges, hysteresis_threshold, lines_gauss, lines_facet
C. Steger: ``Subpixel-Precise Extraction of Lines and Edges''; International Archives of Photogrammetry and Remote Sensing, vol. XXXIII, part B3; pp. 141-156; 2000.
C. Steger: ``Unbiased Extraction of Curvilinear Structures from 2D and 3D Images''; Herbert Utz Verlag, München; 1998.
S. Di Zenzo: ``A Note on the Gradient of a Multi-Image''; Computer Vision, Graphics, and Image Processing, vol. 33; pp. 116-125; 1986.
Aldo Cumani: ``Edge Detection in Multispectral Images''; Computer Vision, Graphics, and Image Processing: Graphical Models and Image Processing, vol. 53, no. 1; pp. 40-51; 1991.
J.Canny: ``Finding Edges and Lines in Images''; Report, AI-TR-720; M.I.T. Artificial Intelligence Lab., Cambridge; 1983.
J.Canny: ``A Computational Approach to Edge Detection''; IEEE Transactions on Pattern Analysis and Machine Intelligence; PAMI-8, vol. 6; pp. 679-698; 1986.
R.Deriche: ``Using Canny's Criteria to Derive a Recursively Implemented Optimal Edge Detector''; International Journal of Computer Vision; vol. 1, no. 2; pp. 167-187; 1987.
R.Deriche: ``Fast Algorithms for Low-Level Vision''; IEEE Transactions on Pattern Analysis and Machine Intelligence; PAMI-12, no. 1; pp. 78-87; 1990.
J. Shen, S. Castan: ``An Optimal Linear Operator for Step Edge Detection''; Computer Vision, Graphics, and Image Processing: Graphical Models and Image Processing, vol. 54, no. 2; pp. 112-133; 1992.
2D Metrology