ClassesClassesClassesClasses | | | | Operators

hough_line_trans_dirhough_line_trans_dirHoughLineTransDirhough_line_trans_dirHoughLineTransDirHoughLineTransDir (Operator)

Name

hough_line_trans_dirhough_line_trans_dirHoughLineTransDirhough_line_trans_dirHoughLineTransDirHoughLineTransDir — Compute the Hough transform for lines using local gradient direction.

Signature

hough_line_trans_dir(ImageDir : HoughImage : DirectionUncertainty, AngleResolution : )

Herror hough_line_trans_dir(const Hobject ImageDir, Hobject* HoughImage, const Hlong DirectionUncertainty, const Hlong AngleResolution)

Herror T_hough_line_trans_dir(const Hobject ImageDir, Hobject* HoughImage, const Htuple DirectionUncertainty, const Htuple AngleResolution)

Herror hough_line_trans_dir(Hobject ImageDir, Hobject* HoughImage, const HTuple& DirectionUncertainty, const HTuple& AngleResolution)

HImage HImage::HoughLineTransDir(const HTuple& DirectionUncertainty, const HTuple& AngleResolution) const

void HoughLineTransDir(const HObject& ImageDir, HObject* HoughImage, const HTuple& DirectionUncertainty, const HTuple& AngleResolution)

HImage HImage::HoughLineTransDir(Hlong DirectionUncertainty, Hlong AngleResolution) const

void HOperatorSetX.HoughLineTransDir(
[in] IHUntypedObjectX* ImageDir, [out] IHUntypedObjectX*HoughImage, [in] VARIANT DirectionUncertainty, [in] VARIANT AngleResolution)

IHImageX* HImageX.HoughLineTransDir(
[in] Hlong DirectionUncertainty, [in] Hlong AngleResolution)

static void HOperatorSet.HoughLineTransDir(HObject imageDir, out HObject houghImage, HTuple directionUncertainty, HTuple angleResolution)

HImage HImage.HoughLineTransDir(int directionUncertainty, int angleResolution)

Description

The operator hough_line_trans_dirhough_line_trans_dirHoughLineTransDirhough_line_trans_dirHoughLineTransDirHoughLineTransDir calculates the Hough transform for lines in those regions passed in the domain of ImageDirImageDirImageDirImageDirImageDirimageDir. To do so, the angles and the lengths of the lines' normal vectors are registered in the parameter space (the so-called Hough or accumulator space).

In contrast to hough_line_transhough_line_transHoughLineTranshough_line_transHoughLineTransHoughLineTrans, additionally the edge direction in ImageDirImageDirImageDirImageDirImageDirimageDir (e.g., returned by sobel_dirsobel_dirSobelDirsobel_dirSobelDirSobelDir or edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage) is taken into account. This results in a more efficient computation and in a reduction of the noise in the Hough space.

The parameter DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty describes how much the edge direction of the individual points within a line is allowed to vary. For example, with DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty = 10 a horizontal line (i.e., edge direction = 0 degrees) may contain points with an edge direction between -10 and +10 degrees. The higher DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty is chosen, the higher the computation time will be. For DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty = 180 hough_line_trans_dirhough_line_trans_dirHoughLineTransDirhough_line_trans_dirHoughLineTransDirHoughLineTransDir shows the same behavior as hough_line_transhough_line_transHoughLineTranshough_line_transHoughLineTransHoughLineTrans, i.e., the edge direction is ignored. DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty should be chosen at least as high as the step width of the edge direction stored in ImageDirImageDirImageDirImageDirImageDirimageDir. The minimum step width is 2 degrees (defined by the image type 'direction').

The result is stored in a newly generated UINT2-Image (HoughImageHoughImageHoughImageHoughImageHoughImagehoughImage), where the x-axis (i.e., columns) represents the angle between the normal vector and the x-axis of the original image, and the y-axis (i.e., rows) represents the distance of the line from the origin.

The angle ranges from -90 to 180 degrees and will be stored with a resolution of 1 / AngleResolutionAngleResolutionAngleResolutionAngleResolutionAngleResolutionangleResolution, which means that one pixel in x-direction is equivalent to 1 / AngleResolutionAngleResolutionAngleResolutionAngleResolutionAngleResolutionangleResolution degrees and that the HoughImageHoughImageHoughImageHoughImageHoughImagehoughImage has a width of 270 * AngleResolutionAngleResolutionAngleResolutionAngleResolutionAngleResolutionangleResolution + 1 pixels. The height of the HoughImageHoughImageHoughImageHoughImageHoughImagehoughImage corresponds to the distance between the lower right corner of the surrounding rectangle of the input region and the origin.

The local maxima in the result image are equivalent to the parameter values of the lines in the original image.

Parallelization

Parameters

ImageDirImageDirImageDirImageDirImageDirimageDir (input_object)  singlechannelimage objectHImageHImageHImageHImageXHobject (direction)

Image containing the edge direction. The edges must be described by the image domain.

HoughImageHoughImageHoughImageHoughImageHoughImagehoughImage (output_object)  image objectHImageHImageHImageHImageXHobject * (uint2)

Hough transform.

DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty (input_control)  angle.deg HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Uncertainty of the edge direction (in degrees).

Default value: 2

Typical range of values: 2 ≤ DirectionUncertainty DirectionUncertainty DirectionUncertainty DirectionUncertainty DirectionUncertainty directionUncertainty ≤ 180

Minimum increment: 2

AngleResolutionAngleResolutionAngleResolutionAngleResolutionAngleResolutionangleResolution (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Resolution in the angle area (in 1/degrees).

Default value: 4

List of values: 1, 2, 4, 8

Result

The operator hough_line_trans_dirhough_line_trans_dirHoughLineTransDirhough_line_trans_dirHoughLineTransDirHoughLineTransDir returns the value 2 (H_MSG_TRUE) if the input is not empty. The behavior in case of empty input is set via the operator 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.

Possible Predecessors

edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage, sobel_dirsobel_dirSobelDirsobel_dirSobelDirSobelDir, thresholdthresholdThresholdthresholdThresholdThreshold, hysteresis_thresholdhysteresis_thresholdHysteresisThresholdhysteresis_thresholdHysteresisThresholdHysteresisThreshold, nonmax_suppression_dirnonmax_suppression_dirNonmaxSuppressionDirnonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDir, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain

Possible Successors

binomial_filterbinomial_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter, gauss_imagegauss_imageGaussImagegauss_imageGaussImageGaussImage, thresholdthresholdThresholdthresholdThresholdThreshold, local_maxlocal_maxLocalMaxlocal_maxLocalMaxLocalMax, plateaus_centerplateaus_centerPlateausCenterplateaus_centerPlateausCenterPlateausCenter

See also

hough_line_transhough_line_transHoughLineTranshough_line_transHoughLineTransHoughLineTrans, hough_lineshough_linesHoughLineshough_linesHoughLinesHoughLines, hough_lines_dirhough_lines_dirHoughLinesDirhough_lines_dirHoughLinesDirHoughLinesDir

Module

Foundation


ClassesClassesClassesClasses | | | | Operators