checker_region ( : RegionChecker : WidthRegion, HeightRegion, WidthPattern, HeightPattern : )

Create a checkered region.

The operator checker_region returns a checkered region. Every black field of the checkerboard belongs to the region. The horizontal and vertical expansion of the region is limited by WidthRegion or HeightRegion, respectively, the size of the fields of the checkerboard by WidthPattern HeightPattern.


Attention

Wird das Muster sehr klein gewählt (WidthPattern < 4) und die Begrenzung groß, so benötigt die erzeugte Region viel Speicher.


Parameters

RegionChecker (output_object)
region -> object
Created checkerboard region.

WidthRegion (input_control)
extent.x -> integer
Largest occurring x value of the region.
Default value: 511
Suggested values: 10, 20, 31, 63, 127, 255, 300, 400, 511
Range of values: 1 <= WidthRegion <= 1024 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: WidthRegion >= 1

HeightRegion (input_control)
extent.y -> integer
Largest occurring y value of the region.
Default value: 511
Suggested values: 10, 20, 31, 63, 127, 255, 300, 400, 511
Range of values: 1 <= HeightRegion <= 1024 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: HeightRegion >= 1

WidthPattern (input_control)
extent.y -> integer
Width of a field of the checkerboard.
Default value: 64
Suggested values: 1, 2, 4, 8, 16, 20, 32, 64, 100, 128, 200, 300, 500
Range of values: 1 <= WidthPattern <= 1024 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: (WidthPattern > 0) && (WidthPattern < WidthRegion)

HeightPattern (input_control)
extent.y -> integer
Height of a field of the checkerboard.
Default value: 64
Suggested values: 1, 2, 4, 8, 16, 20, 32, 64, 100, 128, 200, 300, 500
Range of values: 1 <= HeightPattern <= 1024 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: (HeightPattern > 0) && (HeightPattern < HeightRegion)


Example
get_system(::'width':Width) >
get_system(::'height':Height) >
checker_region(:Checker:Width-1,Height-1,32,64:) >
set_draw(::'fill':) >
disp_region(Checker:::).

Complexity

The required storage (in bytes) for the region is: O((WidthRegion * HeightRegion) / WidthPattern)


Result

The operator checker_region returns the value TRUE if the parameter values are correct. Otherwise an exception is raised. The clipping of the current image format is set via the operator set_system(::'clip_region',<true/false>:).


Possible Successors

paint_region__


Alternatives

grid, store_filled_polygon, store_coord, store_chord, rectangle1, concat_obj, random_region, random_regions


See also

hamming_change_region, reduce_domain



Copyright © 1996-1997 MVTec Software GmbH