ClassesClassesClassesClasses | | | | Operators

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPix (Operator)


edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPix — Extract subpixel precise color edges using Deriche, Shen, or Canny filters.


edges_color_sub_pix(Image : Edges : Filter, Alpha, Low, High : )

Herror edges_color_sub_pix(const Hobject Image, Hobject* Edges, const char* Filter, double Alpha, double Low, double High)

Herror T_edges_color_sub_pix(const Hobject Image, Hobject* Edges, const Htuple Filter, const Htuple Alpha, const Htuple Low, const Htuple High)

Herror edges_color_sub_pix(Hobject Image, Hobject* Edges, const HTuple& Filter, const HTuple& Alpha, const HTuple& Low, const HTuple& High)

HXLDContArray HImage::EdgesColorSubPix(const HTuple& Filter, const HTuple& Alpha, const HTuple& Low, const HTuple& High) const

void EdgesColorSubPix(const HObject& Image, HObject* Edges, const HTuple& Filter, const HTuple& Alpha, const HTuple& Low, const HTuple& High)

HXLDCont HImage::EdgesColorSubPix(const HString& Filter, double Alpha, const HTuple& Low, const HTuple& High) const

HXLDCont HImage::EdgesColorSubPix(const HString& Filter, double Alpha, double Low, double High) const

HXLDCont HImage::EdgesColorSubPix(const char* Filter, double Alpha, double Low, double High) const

void HOperatorSetX.EdgesColorSubPix(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*Edges, [in] VARIANT Filter, [in] VARIANT Alpha, [in] VARIANT Low, [in] VARIANT High)

IHXLDContX* HImageX.EdgesColorSubPix(
[in] BSTR Filter, [in] double Alpha, [in] VARIANT Low, [in] VARIANT High)

static void HOperatorSet.EdgesColorSubPix(HObject image, out HObject edges, HTuple filter, HTuple alpha, HTuple low, HTuple high)

HXLDCont HImage.EdgesColorSubPix(string filter, double alpha, HTuple low, HTuple high)

HXLDCont HImage.EdgesColorSubPix(string filter, double alpha, double low, double high)


edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPix extracts subpixel precise color edges from the input image ImageImageImageImageImageimage. The definition of color edges is given in the description of edges_coloredges_colorEdgesColoredges_colorEdgesColorEdgesColor. The same edge filters as in edges_coloredges_colorEdgesColoredges_colorEdgesColorEdgesColor can be selected: 'canny'"canny""canny""canny""canny""canny", 'deriche1'"deriche1""deriche1""deriche1""deriche1""deriche1", 'deriche2'"deriche2""deriche2""deriche2""deriche2""deriche2", and 'shen'"shen""shen""shen""shen""shen". In addition, a fast Sobel filter can be selected with 'sobel_fast'"sobel_fast""sobel_fast""sobel_fast""sobel_fast""sobel_fast". The filters are specified by the parameter FilterFilterFilterFilterFilterfilter.

The “filter width” (i.e., the amount of smoothing) can be chosen arbitrarily. For a detailed description of this parameter see edges_coloredges_colorEdgesColoredges_colorEdgesColorEdgesColor. This parameter is ignored for FilterFilterFilterFilterFilterfilter = 'sobel_fast'"sobel_fast""sobel_fast""sobel_fast""sobel_fast""sobel_fast".

The extracted edges are returned as subpixel precise XLD contours in EdgesEdgesEdgesEdgesEdgesedges. For all edge operators except for 'sobel_fast'"sobel_fast""sobel_fast""sobel_fast""sobel_fast""sobel_fast", the following attributes are defined for each edge point (see get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldget_contour_attrib_xldGetContourAttribXldGetContourAttribXld):

'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction": Edge direction
'angle'"angle""angle""angle""angle""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
'response'"response""response""response""response""response":       Edge amplitude (color gradient magnitude)

edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPix links the edge points into edges by using an algorithm similar to a hysteresis threshold operation, which is also used in edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix and lines_gausslines_gaussLinesGausslines_gaussLinesGaussLinesGauss. Points with an amplitude larger than HighHighHighHighHighhigh are immediately accepted as belonging to an edge, while points with an amplitude smaller than LowLowLowLowLowlow are rejected. All other points are accepted as edges if they are connected to accepted edge points (see also lines_gausslines_gaussLinesGausslines_gaussLinesGaussLinesGauss and hysteresis_thresholdhysteresis_thresholdHysteresisThresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold).

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'"_junctions""_junctions""_junctions""_junctions""_junctions" to the values of FilterFilterFilterFilterFilterfilter that are described above. This mode is analogous to the mode for completing junctions that is available in edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix and lines_gausslines_gaussLinesGausslines_gaussLinesGaussLinesGauss.

The edge operator 'sobel_fast'"sobel_fast""sobel_fast""sobel_fast""sobel_fast""sobel_fast" has the same semantics as all the other edge operators. Internally, howver, it is based on significantly simplified variants of the individual processing steps (hysteresis thresholding, edge point linking, and extraction of the subpixel edge positions). Therefore, 'sobel_fast'"sobel_fast""sobel_fast""sobel_fast""sobel_fast""sobel_fast" in some cases may return slightly less accurate edge positions and may select different edge parts.



ImageImageImageImageImageimage (input_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject (byte / uint2)

Input image.

EdgesEdgesEdgesEdgesEdgesedges (output_object)  xld_cont-array objectHXLDContHXLDContHXLDContArrayHXLDContXHobject *

Extracted edges.

FilterFilterFilterFilterFilterfilter (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Edge operator to be applied.

Default value: 'canny' "canny" "canny" "canny" "canny" "canny"

List of values: 'canny'"canny""canny""canny""canny""canny", 'canny_junctions'"canny_junctions""canny_junctions""canny_junctions""canny_junctions""canny_junctions", 'deriche1'"deriche1""deriche1""deriche1""deriche1""deriche1", 'deriche1_junctions'"deriche1_junctions""deriche1_junctions""deriche1_junctions""deriche1_junctions""deriche1_junctions", 'deriche2'"deriche2""deriche2""deriche2""deriche2""deriche2", 'deriche2_junctions'"deriche2_junctions""deriche2_junctions""deriche2_junctions""deriche2_junctions""deriche2_junctions", 'shen'"shen""shen""shen""shen""shen", 'shen_junctions'"shen_junctions""shen_junctions""shen_junctions""shen_junctions""shen_junctions", 'sobel_fast'"sobel_fast""sobel_fast""sobel_fast""sobel_fast""sobel_fast"

AlphaAlphaAlphaAlphaAlphaalpha (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

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 Alpha Alpha Alpha Alpha alpha ≤ 50.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: Alpha > 0.0

LowLowLowLowLowlow (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

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 Low Low Low Low low

Minimum increment: 1

Recommended increment: 5

Restriction: Low > 0

HighHighHighHighHighhigh (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

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 High High High High high

Minimum increment: 1

Recommended increment: 5

Restriction: High > 0 && High >= Low


The amount of temporary memory required is dependent on the height H of the domain of ImageImageImageImageImageimage.


edges_color_sub_pixedges_color_sub_pixEdgesColorSubPixedges_color_sub_pixEdgesColorSubPixEdgesColorSubPix 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.



See also

edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage, edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix, info_edgesinfo_edgesInfoEdgesinfo_edgesInfoEdgesInfoEdges, hysteresis_thresholdhysteresis_thresholdHysteresisThresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold, lines_gausslines_gaussLinesGausslines_gaussLinesGaussLinesGauss, lines_facetlines_facetLinesFacetlines_facetLinesFacetLinesFacet


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

ClassesClassesClassesClasses | | | | Operators