gen_random_regions
— Create random regions like circles, rectangles and ellipses.
gen_random_regions( : Regions : Type, WidthMin, WidthMax, HeightMin, HeightMax, PhiMin, PhiMax, NumRegions, Width, Height : )
The operator gen_random_regions
generates circles, rectangles
and ellipses whose parameters are determined at random.
In each case only one lower, upper limit respectively, is given.
The position is always random and cannot be determined by parameters.
The parameter NumRegions
indicates how many regions
shall be created.
Regions
(output_object) region-array →
object
Created regions.
Type
(input_control) string →
(string)
Type of regions to be created.
Default value: 'circle'
List of values: 'circle' , 'ellipse' , 'rectangle1' , 'rectangle2' , 'ring'
WidthMin
(input_control) number →
(real / integer)
Minimum width of the region.
Default value: 10.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0
≤
WidthMin
≤
511.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: WidthMin > 0
WidthMax
(input_control) number →
(real / integer)
Maximum width of the region.
Default value: 20.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0
≤
WidthMax
≤
511.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: WidthMax > 0
HeightMin
(input_control) number →
(real / integer)
Minimum height of the region.
Default value: 10.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0
≤
HeightMin
≤
511.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: HeightMin > 0
HeightMax
(input_control) number →
(real / integer)
Maximum height of the region.
Default value: 30.0
Suggested values: 1.0, 3.0, 5.0, 10.0, 20.0, 40.0, 80.0
Typical range of values: 1.0
≤
HeightMax
≤
511.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: HeightMax > 0
PhiMin
(input_control) number →
(real / integer)
Minimum rotation angle of the region.
Default value: -0.7854
Suggested values: 0.0, 0.1, 0.3, 0.6, 0.9, 1.2, 1.5
Typical range of values: 0.0
≤
PhiMin
≤
6.28
(lin)
Restriction: PhiMin > 0
PhiMax
(input_control) number →
(real / integer)
Maximum rotation angle of the region.
Default value: 0.7854
Suggested values: 0.0, 0.1, 0.3, 0.6, 0.9, 1.2, 1.5
Typical range of values: 0.0
≤
PhiMax
≤
6.28
(lin)
Restriction: PhiMax > 0
NumRegions
(input_control) integer →
(integer)
Number of regions.
Default value: 100
Suggested values: 1, 5, 20, 100, 200, 500, 1000, 2000
Typical range of values: 1
≤
NumRegions
≤
2000
(lin)
Minimum increment: 1
Recommended increment: 10
Restriction: NumRegions > 0
Width
(input_control) integer →
(integer)
Maximum horizontal expansion.
Default value: 512
Suggested values: 128, 256, 512, 1024
Typical range of values: 1
≤
Width
≤
1024
(lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Width > 0
Height
(input_control) integer →
(integer)
Maximum vertical expansion.
Default value: 512
Suggested values: 128, 256, 512, 1024
Typical range of values: 1
≤
Height
≤
1024
(lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Height > 0
If the parameter values are correct gen_random_regions
returns
the value 2 (H_MSG_TRUE).
Otherwise an exception is raised.
The clipping according to the current image format is determined by
the operator set_system('clip_region',<'true'/'false'>)
.
Foundation