HALCON Reference Manual 10.0.2
Table of Contents / Filters / Edges ClassesClassesClasses | | | Operators

info_edgesT_info_edgesinfo_edgesInfoEdgesInfoEdges (Operator)

Name

info_edgesT_info_edgesinfo_edgesInfoEdgesInfoEdges — Estimate the width of a filter in edges_imageedges_imageedges_imageEdgesImageEdgesImage.

Signature

info_edges( : : Filter, Mode, Alpha : Size, Coeffs)

Herror T_info_edges(const Htuple Filter, const Htuple Mode, const Htuple Alpha, Htuple* Size, Htuple* Coeffs)

Herror info_edges(const HTuple& Filter, const HTuple& Mode, const HTuple& Alpha, HTuple* Size, HTuple* Coeffs)

void HOperatorSetX.InfoEdges(
[in] VARIANT Filter, [in] VARIANT Mode, [in] VARIANT Alpha, [out] VARIANT* Size, [out] VARIANT* Coeffs)

Hlong HMiscX.InfoEdges(
[in] BSTR Filter, [in] BSTR Mode, [in] double Alpha, [out] VARIANT* Coeffs)

static void HOperatorSet.InfoEdges(HTuple filter, HTuple mode, HTuple alpha, out HTuple size, out HTuple coeffs)

static int HMisc.InfoEdges(string filter, string mode, double alpha, out HTuple coeffs)

Description

info_edgesinfo_edgesinfo_edgesInfoEdgesInfoEdges returns an estimate of the width of any of the filters used in edges_imageedges_imageedges_imageEdgesImageEdgesImage. To do so, the corresponding continuous impulse responses of the filters are sampled until the first filter coefficient is smaller than five percent of the largest coefficient. AlphaAlphaAlphaAlphaalpha is the filter parameter (see edges_imageedges_imageedges_imageEdgesImageEdgesImage). Seven edge operators are supported (parameter FilterFilterFilterFilterfilter):

'deriche1', 'lanser1', 'deriche2', 'lanser2', 'shen', 'mshen' and 'canny'.

The parameter ModeModeModeModemode ('edge'/'smooth') is used to determine whether the corresponding edge or smoothing operator is to be sampled. The Canny operator (which uses the Gaussian for smoothing) is implemented using conventional filter masks, while all other filters are implemented recursively. Therefore, for the Canny filter the coefficients of the one-dimensional impulse responses f(n) with n >= 0 are returned in CoeffsCoeffsCoeffsCoeffscoeffs in addition to the filter width.

Parallelization

Parameters

FilterFilterFilterFilterfilter (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Name of the edge operator.

Default value: 'lanser2' "lanser2" "lanser2" "lanser2" "lanser2"

List of values: 'deriche1'"deriche1""deriche1""deriche1""deriche1", 'lanser1'"lanser1""lanser1""lanser1""lanser1", 'deriche2'"deriche2""deriche2""deriche2""deriche2", 'lanser2'"lanser2""lanser2""lanser2""lanser2", 'shen'"shen""shen""shen""shen", 'mshen'"mshen""mshen""mshen""mshen", 'canny'"canny""canny""canny""canny"

ModeModeModeModemode (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

1D edge filter ('edge') or 1D smoothing filter ('smooth').

Default value: 'edge' "edge" "edge" "edge" "edge"

List of values: 'edge'"edge""edge""edge""edge", 'smooth'"smooth""smooth""smooth""smooth"

AlphaAlphaAlphaAlphaalpha (input_control)  real HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Filter parameter: small values result in strong smoothing, and thus less detail (opposite for 'canny').

Default value: 0.5

Typical range of values: 0.2 ≤ Alpha Alpha Alpha Alpha alpha ≤ 50.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: Alpha > 0.0

SizeSizeSizeSizesize (output_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Filter width in pixels.

CoeffsCoeffsCoeffsCoeffscoeffs (output_control)  integer-array HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

For Canny filters: Coefficients of the “positive” half of the 1D impulse response.

Example (HDevelop)

read_image(Image,'fabrik')
info_edges('lanser2','edge',0.5,Size,Coeffs)
edges_image(Image,Amp,Dir,'lanser2',0.5,'none',-1,-1)
hysteresis_threshold(Amp,Margin,20,30,30)

Example (C)

read_image(&Image,"fabrik");
info_edges("lanser2","edge",0.5,Size,Coeffs) ;
edges_image(Image,&Amp,&Dir,"lanser2",0.5,"none",-1,-1);
hysteresis_threshold(Amp,&Margin,20,30,30);

Example (HDevelop)

read_image(Image,'fabrik')
info_edges('lanser2','edge',0.5,Size,Coeffs)
edges_image(Image,Amp,Dir,'lanser2',0.5,'none',-1,-1)
hysteresis_threshold(Amp,Margin,20,30,30)

Example (HDevelop)

read_image(Image,'fabrik')
info_edges('lanser2','edge',0.5,Size,Coeffs)
edges_image(Image,Amp,Dir,'lanser2',0.5,'none',-1,-1)
hysteresis_threshold(Amp,Margin,20,30,30)

Example (HDevelop)

read_image(Image,'fabrik')
info_edges('lanser2','edge',0.5,Size,Coeffs)
edges_image(Image,Amp,Dir,'lanser2',0.5,'none',-1,-1)
hysteresis_threshold(Amp,Margin,20,30,30)

Result

info_edgesinfo_edgesinfo_edgesInfoEdgesInfoEdges returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behaviour can be set via set_system('no_object_result',<Result>)set_system("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.

Possible Successors

edges_imageedges_imageedges_imageEdgesImageEdgesImage, thresholdthresholdthresholdThresholdThreshold, skeletonskeletonskeletonSkeletonSkeleton

See also

edges_imageedges_imageedges_imageEdgesImageEdgesImage

Module

Foundation


Table of Contents / Filters / Edges ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH