add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXldadd_noise_white_contour_xld (Operator)

Name

add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXldadd_noise_white_contour_xld — Verrauschen von XLD-Konturen.

Signatur

add_noise_white_contour_xld(Contours : NoisyContours : NumRegrPoints, Amp : )

Herror add_noise_white_contour_xld(const Hobject Contours, Hobject* NoisyContours, const Hlong NumRegrPoints, double Amp)

Herror T_add_noise_white_contour_xld(const Hobject Contours, Hobject* NoisyContours, const Htuple NumRegrPoints, const Htuple Amp)

void AddNoiseWhiteContourXld(const HObject& Contours, HObject* NoisyContours, const HTuple& NumRegrPoints, const HTuple& Amp)

HXLDCont HXLDCont::AddNoiseWhiteContourXld(Hlong NumRegrPoints, double Amp) const

static void HOperatorSet.AddNoiseWhiteContourXld(HObject contours, out HObject noisyContours, HTuple numRegrPoints, HTuple amp)

HXLDCont HXLDCont.AddNoiseWhiteContourXld(int numRegrPoints, double amp)

def add_noise_white_contour_xld(contours: HObject, num_regr_points: int, amp: float) -> HObject

Beschreibung

add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXldadd_noise_white_contour_xld erzeugt aus den Konturen, die in ContoursContoursContourscontourscontours übergeben werden, neue Konturen NoisyContoursNoisyContoursNoisyContoursnoisyContoursnoisy_contours mit verrauschten Konturpunkten. Dazu wird für jeden Konturpunkt der Eingabekonturen die lokale Regressionsgeraden aus den NumRegrPointsNumRegrPointsNumRegrPointsnumRegrPointsnum_regr_points benachbarten Punkten bestimmt. Dann wird der Punkt senkrecht zur Regressionsgeraden verschoben. Der Betrag dieser Verschiebung entspricht gleichverteiltem, mittelwertfreiem, weißem Rauschen mit maximaler Amplitude AmpAmpAmpampamp.

Die Verrauschung wird mit Hilfe der C-Funktion „drand48()“ generiert. Für Informationen zu den verwendeten Seeds siehe den Parameter 'seed_rand'"seed_rand""seed_rand""seed_rand""seed_rand" in set_systemset_systemSetSystemSetSystemset_system.

Ausführungsinformationen

Parameter

ContoursContoursContourscontourscontours (input_object)  xld_cont(-array) objectHXLDContHObjectHObjectHobject

Zu verrauschende Konturen.

NoisyContoursNoisyContoursNoisyContoursnoisyContoursnoisy_contours (output_object)  xld_cont(-array) objectHXLDContHObjectHObjectHobject *

Verrauschte Konturen.

NumRegrPointsNumRegrPointsNumRegrPointsnumRegrPointsnum_regr_points (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Anzahl der für die Regressionsgerade verwendeten Punkte.

Default: 5

Wertevorschläge: 3, 5, 7, 9

Restriktion: NumRegrPoints >= 3 && odd(NumRegrPoints)

AmpAmpAmpampamp (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Maximale Amplitude des additiven Rauschens (in [-Amp,Amp] gleichverteilt).

Default: 1.0

Wertevorschläge: 0.25, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 10.0

Restriktion: Amp > 0

Beispiel (HDevelop)

draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
                        'positive', 1.5)
add_noise_white_contour_xld(Ellipse,NoisyEllipse,5,0.5)
fit_ellipse_contour_xld (NoisyEllipse, 'fitzgibbon', -1, 2, 0, 200, 3, 2.0, \
                         ERow, EColumn, EPhi, ERadius1, ERadius2, \
                         EStartPhi, EEndPhi, EPointOrder)

Beispiel (C)

draw_ellipse(WindowHandle,&Row,&Column,&Phi,&Radius1,&Radius2);
gen_ellipse_contour_xld(&Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319,
                        "positive",1.5);
add_noise_white_contour_xld(Ellipse,&NoisyEllipse,5,0.5);
fit_ellipse_contour_xld (NoisyEllipse, "fitzgibbon", -1, 2, 0, 200, 3, 2.0,
                         &ERow, &EColumn, &EPhi, &ERadius1, &ERadius2,
                         &EStartPhi, &EEndPhi, &EPointOrder);

Beispiel (HDevelop)

draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
                        'positive', 1.5)
add_noise_white_contour_xld(Ellipse,NoisyEllipse,5,0.5)
fit_ellipse_contour_xld (NoisyEllipse, 'fitzgibbon', -1, 2, 0, 200, 3, 2.0, \
                         ERow, EColumn, EPhi, ERadius1, ERadius2, \
                         EStartPhi, EEndPhi, EPointOrder)

Beispiel (HDevelop)

draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
                        'positive', 1.5)
add_noise_white_contour_xld(Ellipse,NoisyEllipse,5,0.5)
fit_ellipse_contour_xld (NoisyEllipse, 'fitzgibbon', -1, 2, 0, 200, 3, 2.0, \
                         ERow, EColumn, EPhi, ERadius1, ERadius2, \
                         EStartPhi, EEndPhi, EPointOrder)

Ergebnis

Sind die Parameterwerte korrekt, dann liefert add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXldadd_noise_white_contour_xld den Wert 2 ( H_MSG_TRUE) . Das Verhalten bei leerer Eingabe (keine Eingabebilder vorhanden) lässt sich mittels set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, lines_gausslines_gaussLinesGaussLinesGausslines_gauss, lines_facetlines_facetLinesFacetLinesFacetlines_facet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix, gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXldgen_ellipse_contour_xld

Nachfolger

smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldsmooth_contours_xld

Siehe auch

smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldsmooth_contours_xld, add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteadd_noise_white

Modul

Foundation