add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXld (Operator)
Name
add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXld
— Add noise to XLD contours.
Signature
Description
add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXldAddNoiseWhiteContourXld
adds noise to the input XLD contours
ContoursContoursContoursContourscontours
and returns the noisy contours in
NoisyContoursNoisyContoursNoisyContoursNoisyContoursnoisyContours
. For each point along the original contours
the local regression line (i.e., a least-squares approximating line)
based on NumRegrPointsNumRegrPointsNumRegrPointsNumRegrPointsnumRegrPoints
neighboring points is determined.
Then the point is shifted perpendicular to this line. The length
of the shifts corresponds to white noise, equally distributed in the
interval [-AmpAmpAmpAmpamp
,AmpAmpAmpAmpamp
] generated by using the C
function “drand48” with an initial time dependent seed.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
ContoursContoursContoursContourscontours
(input_object) xld_cont(-array) →
objectHXLDContHXLDContHobject
Original contours.
NoisyContoursNoisyContoursNoisyContoursNoisyContoursnoisyContours
(output_object) xld_cont(-array) →
objectHXLDContHXLDContHobject *
Noisy contours.
NumRegrPointsNumRegrPointsNumRegrPointsNumRegrPointsnumRegrPoints
(input_control) integer →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of points used to calculate the regression
line.
Default value: 5
Suggested values: 3, 5, 7, 9
Restriction: NumRegrPoints >= 3 && odd(NumRegrPoints)
AmpAmpAmpAmpamp
(input_control) real →
HTupleHTupleHtuple (real) (double) (double) (double)
Maximum amplitude of the added noise (equally
distributed in [-Amp,Amp]).
Default value: 1.0
Suggested values: 0.25, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 10.0
Restriction: Amp > 0
Example (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)
Example (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);
Example (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)
Example (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)
Example (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)
Result
add_noise_white_contour_xldadd_noise_white_contour_xldAddNoiseWhiteContourXldAddNoiseWhiteContourXldAddNoiseWhiteContourXld
returns 2 (H_MSG_TRUE) if all parameter
values 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>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)
. If necessary, an
exception is raised.
Possible Predecessors
gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXld
,
lines_gausslines_gaussLinesGaussLinesGaussLinesGauss
,
lines_facetlines_facetLinesFacetLinesFacetLinesFacet
,
edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix
,
gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXldGenEllipseContourXld
Possible Successors
smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldSmoothContoursXld
See also
smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldSmoothContoursXld
,
add_noise_whiteadd_noise_whiteAddNoiseWhiteAddNoiseWhiteAddNoiseWhite
Module
Foundation