KlassenKlassenKlassenKlassen | | | | Operatoren

hough_lines_dirT_hough_lines_dirHoughLinesDirhough_lines_dirHoughLinesDirHoughLinesDir (Operator)

Name

hough_lines_dirT_hough_lines_dirHoughLinesDirhough_lines_dirHoughLinesDirHoughLinesDir — Finden von Linien in Kantenbildern mit Hilfe der Hough-Transformation unter Berücksichtigung der lokalen Gradientenrichtung und Ausgabe in Hessescher Normalform.

Signatur

hough_lines_dir(ImageDir : HoughImage, Lines : DirectionUncertainty, AngleResolution, Smoothing, FilterSize, Threshold, AngleGap, DistGap, GenLines : Angle, Dist)

Herror T_hough_lines_dir(const Hobject ImageDir, Hobject* HoughImage, Hobject* Lines, const Htuple DirectionUncertainty, const Htuple AngleResolution, const Htuple Smoothing, const Htuple FilterSize, const Htuple Threshold, const Htuple AngleGap, const Htuple DistGap, const Htuple GenLines, Htuple* Angle, Htuple* Dist)

Herror hough_lines_dir(Hobject ImageDir, Hobject* HoughImage, Hobject* Lines, const HTuple& DirectionUncertainty, const HTuple& AngleResolution, const HTuple& Smoothing, const HTuple& FilterSize, const HTuple& Threshold, const HTuple& AngleGap, const HTuple& DistGap, const HTuple& GenLines, HTuple* Angle, HTuple* Dist)

HImage HImage::HoughLinesDir(HRegionArray* Lines, const HTuple& DirectionUncertainty, const HTuple& AngleResolution, const HTuple& Smoothing, const HTuple& FilterSize, const HTuple& Threshold, const HTuple& AngleGap, const HTuple& DistGap, const HTuple& GenLines, HTuple* Angle, HTuple* Dist) const

void HoughLinesDir(const HObject& ImageDir, HObject* HoughImage, HObject* Lines, const HTuple& DirectionUncertainty, const HTuple& AngleResolution, const HTuple& Smoothing, const HTuple& FilterSize, const HTuple& Threshold, const HTuple& AngleGap, const HTuple& DistGap, const HTuple& GenLines, HTuple* Angle, HTuple* Dist)

HImage HImage::HoughLinesDir(HRegion* Lines, Hlong DirectionUncertainty, Hlong AngleResolution, const HString& Smoothing, Hlong FilterSize, Hlong Threshold, Hlong AngleGap, Hlong DistGap, const HString& GenLines, HTuple* Angle, HTuple* Dist) const

HImage HImage::HoughLinesDir(HRegion* Lines, Hlong DirectionUncertainty, Hlong AngleResolution, const char* Smoothing, Hlong FilterSize, Hlong Threshold, Hlong AngleGap, Hlong DistGap, const char* GenLines, HTuple* Angle, HTuple* Dist) const

void HOperatorSetX.HoughLinesDir(
[in] IHUntypedObjectX* ImageDir, [out] IHUntypedObjectX*HoughImage, [out] IHUntypedObjectX*Lines, [in] VARIANT DirectionUncertainty, [in] VARIANT AngleResolution, [in] VARIANT Smoothing, [in] VARIANT FilterSize, [in] VARIANT Threshold, [in] VARIANT AngleGap, [in] VARIANT DistGap, [in] VARIANT GenLines, [out] VARIANT* Angle, [out] VARIANT* Dist)

IHImageX* HImageX.HoughLinesDir(
[out] IHRegionX*Lines, [in] Hlong DirectionUncertainty, [in] Hlong AngleResolution, [in] BSTR Smoothing, [in] Hlong FilterSize, [in] Hlong Threshold, [in] Hlong AngleGap, [in] Hlong DistGap, [in] BSTR GenLines, [out] VARIANT* Angle, [out] VARIANT* Dist)

static void HOperatorSet.HoughLinesDir(HObject imageDir, out HObject houghImage, out HObject lines, HTuple directionUncertainty, HTuple angleResolution, HTuple smoothing, HTuple filterSize, HTuple threshold, HTuple angleGap, HTuple distGap, HTuple genLines, out HTuple angle, out HTuple dist)

HImage HImage.HoughLinesDir(out HRegion lines, int directionUncertainty, int angleResolution, string smoothing, int filterSize, int threshold, int angleGap, int distGap, string genLines, out HTuple angle, out HTuple dist)

Beschreibung

Mit Hilfe von hough_lines_dirhough_lines_dirHoughLinesDirhough_lines_dirHoughLinesDirHoughLinesDir können in einer Region linienhafte Strukturen selektiert werden. Dabei müssen die einzelnen Punkte einer Linie nicht zusammenhängen. Das Verfahren basiert auf der Hough-Transformation. Die Region muss als Definitionsbereich in ImageDirImageDirImageDirImageDirImageDirimageDir übergeben werden. Linien werden in Hessescher Normalform, d.h durch Richtung und Länge ihres Normalenvektors repräsentiert.

Im Unterschied zu hough_lineshough_linesHoughLineshough_linesHoughLinesHoughLines wird hier jedoch zusätzlich die in ImageDirImageDirImageDirImageDirImageDirimageDir übergebene Kantenrichtung berücksichtigt, die z.B. mit Hilfe von sobel_dirsobel_dirSobelDirsobel_dirSobelDirSobelDir oder edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage bestimmt werden kann. Dies führt zu einer effizienteren Berechnung und zu einer Reduktion des Rauschens im Hough-Raum.

Der Parameter DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty beschreibt hierbei, wie stark die Kantenrichtung der einzelnen Punkte innerhalb einer Linie variieren darf. Ist z.B. DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty = 10, werden einer waagrechten Linie (d.h. Kantenrichtung = 0 Grad) nur Punkte mit einer Kantenrichtung zwischen -10 und +10 Grad zugeordnet. Je größer DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty gewählt wird desto langsamer ist die Berechung; für DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty = 180 entspricht das Verhalten von hough_lines_dirhough_lines_dirHoughLinesDirhough_lines_dirHoughLinesDirHoughLinesDir dem von hough_lineshough_linesHoughLineshough_linesHoughLinesHoughLines, d.h. die Kantenrichtung wird ignoriert. DirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintyDirectionUncertaintydirectionUncertainty sollte mindestens so groß gewählt werden wie die Winkelschrittweite, in der die Kantenrichtungen in ImageDirImageDirImageDirImageDirImageDirimageDir gespeichert werden; die minimale Schrittweite beträgt 2 Grad (vorgegeben vom Bildtyp 'direction').

Mit AngleResolutionAngleResolutionAngleResolutionAngleResolutionAngleResolutionangleResolution wird die Genauigkeit bei der Bestimmung der Winkel definiert. Sie beträgt 1 / AngleResolutionAngleResolutionAngleResolutionAngleResolutionAngleResolutionangleResolution Grad. Eine Glättung des Hough-Raumes nach der Transformation erhöht die Stabilität des Verfahrens. Die Art der Glättung kann mit SmoothingSmoothingSmoothingSmoothingSmoothingsmoothing festgelegt werden. Der Glättungsgrad kann mit FilterSizeFilterSizeFilterSizeFilterSizeFilterSizefilterSize analog zu gauss_filtergauss_filterGaussFiltergauss_filterGaussFilterGaussFilter oder mean_imagemean_imageMeanImagemean_imageMeanImageMeanImage angegeben werden. Der Parameter ThresholdThresholdThresholdThresholdThresholdthreshold bestimmt, durch wieviel Punkte der Ausgangsregion eine Linienhypothese wenigstens gestützt werden muss, um in die Ausgabe zu gelangen. AngleGapAngleGapAngleGapAngleGapAngleGapangleGap und DistGapDistGapDistGapDistGapDistGapdistGap definieren eine Umgebung um die Punkte im Hough-Bild für die Bestimmung der lokalen Maxima: AngleGapAngleGapAngleGapAngleGapAngleGapangleGap beschreibt den minimalen Abstand zweier Maxima im Hough-Bild in Richtung des Winkels und DistGapDistGapDistGapDistGapDistGapdistGap entsprechend Richtung der Distanz. Dadurch werden Maxima, die zwar die vorgegebene Schwelle ThresholdThresholdThresholdThresholdThresholdthreshold überschreiten, jedoch sehr nahe an einem noch höheren Maximum liegen, eliminiert. Dies kann vor allem bei der gleichzeitigen Suche nach langen und kurzen Linien hilfreich sein. Neben dem ungeglätteten Hough-Bild HoughImageHoughImageHoughImageHoughImageHoughImagehoughImage werden die Linien in Hessescher Normalform (AngleAngleAngleAngleAngleangle, DistDistDistDistDistdist) zurückgeliefert. Mit Hilfe des Parameters GenLinesGenLinesGenLinesGenLinesGenLinesgenLines kann darüberhinaus festgelegt werden, ob zusätzlich diejenigen Regionen in ImageDirImageDirImageDirImageDirImageDirimageDir zurückgeliefert werden sollen, die zur Bildung der lokalen Maxima beigetragen haben. Für GenLinesGenLinesGenLinesGenLinesGenLinesgenLines = 'true'"true""true""true""true""true" werden diese dann in LinesLinesLinesLinesLineslines gespeichert.

Parallelisierung

Parameter

ImageDirImageDirImageDirImageDirImageDirimageDir (input_object)  singlechannelimage objectHImageHImageHImageHImageXHobject (direction)

Kantenrichtungsbild mit auf die Kanten eingeschränktem Definitionsbereich.

HoughImageHoughImageHoughImageHoughImageHoughImagehoughImage (output_object)  image objectHImageHImageHImageHImageXHobject * (uint2)

Hough-Transformation.

LinesLinesLinesLinesLineslines (output_object)  region-array objectHRegionHRegionHRegionArrayHRegionXHobject *

Regionen des Eingabebildes, die zur Bildung der lokalen Maxima beigetragen haben.

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

Kantenungenauigkeit (in Grad).

Defaultwert: 2

Typischer Wertebereich: 2 ≤ DirectionUncertainty DirectionUncertainty DirectionUncertainty DirectionUncertainty DirectionUncertainty directionUncertainty ≤ 180

Minimale Schrittweite: 2

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

Auflösung im Winkelbereich (in 1/Grad).

Defaultwert: 4

Werteliste: 1, 2, 4, 8

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

Glättungsfilter für Hough-Bild.

Defaultwert: 'mean' "mean" "mean" "mean" "mean" "mean"

Werteliste: 'gauss'"gauss""gauss""gauss""gauss""gauss", 'mean'"mean""mean""mean""mean""mean", 'none'"none""none""none""none""none"

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

Gewünschte Größe des Glättungsfilters.

Defaultwert: 5

Werteliste: 3, 5, 7, 9, 11

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

Schwellenwert im Hough-Bild.

Defaultwert: 100

Typischer Wertebereich: 1 ≤ Threshold Threshold Threshold Threshold Threshold threshold

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

Minimaler Abstand zwischen zwei Maxima im Hough-Bild (in Richtung des Winkels).

Defaultwert: 5

Typischer Wertebereich: 0 ≤ AngleGap AngleGap AngleGap AngleGap AngleGap angleGap

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

Minimaler Abstand zwischen zwei Maxima im Hough-Bild (in Richtung der Distance).

Defaultwert: 5

Typischer Wertebereich: 0 ≤ DistGap DistGap DistGap DistGap DistGap distGap

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

Generiert Geraden-Regionen, wenn 'true'"true""true""true""true""true".

Defaultwert: 'true' "true" "true" "true" "true" "true"

Werteliste: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

AngleAngleAngleAngleAngleangle (output_control)  hesseline.angle.rad-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Winkel (im Bogenmaß) der Normalenvektoren der gefundenen Linien.

Typischer Wertebereich: -1.5707963 ≤ Angle Angle Angle Angle Angle angle ≤ 3.1415927

DistDistDistDistDistdist (output_control)  hesseline.distance-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Abstände der gefundenen Linien vom Koordinatenursprung.

Parameteranzahl: Dist == Angle

Typischer Wertebereich: 0 ≤ Dist Dist Dist Dist Dist dist

Ergebnis

hough_lines_dirhough_lines_dirHoughLinesDirhough_lines_dirHoughLinesDirHoughLinesDir liefert den Wert 2 (H_MSG_TRUE), falls die Eingabe nicht leer ist. Das Verhalten bei leerer Eingabe (keine Eingaberegionen vorhanden) lässt sich mittels 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>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

edges_imageedges_imageEdgesImageedges_imageEdgesImageEdgesImage, sobel_dirsobel_dirSobelDirsobel_dirSobelDirSobelDir, thresholdthresholdThresholdthresholdThresholdThreshold, nonmax_suppression_dirnonmax_suppression_dirNonmaxSuppressionDirnonmax_suppression_dirNonmaxSuppressionDirNonmaxSuppressionDir, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain, skeletonskeletonSkeletonskeletonSkeletonSkeleton

Nachfolger

gen_region_hlinegen_region_hlineGenRegionHlinegen_region_hlineGenRegionHlineGenRegionHline, select_matching_linesselect_matching_linesSelectMatchingLinesselect_matching_linesSelectMatchingLinesSelectMatchingLines

Siehe auch

hough_line_trans_dirhough_line_trans_dirHoughLineTransDirhough_line_trans_dirHoughLineTransDirHoughLineTransDir, hough_line_transhough_line_transHoughLineTranshough_line_transHoughLineTransHoughLineTrans, gen_region_hlinegen_region_hlineGenRegionHlinegen_region_hlineGenRegionHlineGenRegionHline, hough_circleshough_circlesHoughCircleshough_circlesHoughCirclesHoughCircles

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren