gen_region_polygon_filledπ
Short descriptionπ
gen_region_polygon_filled β Store a polygon as a βfilledβ region.
Signatureπ
gen_region_polygon_filled( out region Region, polygon.y Rows, polygon.x Columns )
Descriptionπ
The operator gen_region_polygon_filled creates a region from
a polygon containing the corner points of the region (line and
column coordinates) either clockwise or anti-clockwise.
Contrary to gen_region_polygon a βfilledβ region is
returned here.
Note that for subpixel coordinates Rows and Columns the
coordinates are rounded before the polygon containing the corner points is
determined. Therefore there might be pixels in the Region which
do not lie on the original (subpixel) polygon. An simple alternative in
the case of polygons without holes would be to use the operators
gen_region_polygon and fill_up.
Execution informationπ
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π
Region (output_object) region β object
Created region.
Rows (input_control) polygon.y-array β (integer / real)
Line indices of the base points of the region contour.
Default: 100
Suggested values: 0, 10, 30, 50, 100, 200, 300, 500
Value range: Rows (lin)
Minimum increment: 1
Recommended increment: 1
Columns (input_control) polygon.x-array β (integer / real)
Column indices of the base points of the region contour.
Number of elements: Columns == Rows
Default: 100
Suggested values: 0, 10, 30, 50, 100, 200, 300, 500
Value range: Columns (lin)
Minimum increment: 1
Recommended increment: 1
Exampleπ
(C)
/* Polygon approximation */
T_get_region_polygon(Region,7,&Row,&Column)\;
T_gen_region_polygon_filled(&Pol,Row,Column)\;
/* fill up with original gray value */
reduce_domain(Image,Pol,&New)\;
Resultπ
If the base points are correct the operator gen_region_polygon_filled
returns the value 2 (H_MSG_TRUE).
Otherwise an exception is raised.
The clipping according to the global image size is set via the
operator set_system('clip_region',<'true'/'false'>).
If an empty region is created (by the clipping or by an empty input)
the operator
set_system('store_empty_region',<'true'/'false'>) determines
whether the region is returned or an empty object tuple.
Combinations with other operatorsπ
Combinations
Possible predecessors
get_region_polygon, draw_polygon
Alternatives
gen_region_polygon, gen_region_points, draw_polygon
See also
gen_region_polygon, reduce_domain, get_region_polygon, gen_region_runs
Moduleπ
Foundation