rectangle1 ( : Rectangle : Row1, Column1, Row2, Column2 : )

Create a rectangle parallel to the coordinate axes.

The operator rectangle1 generates one or more rectangles parallel to the coordinate axes which are described by the upper left corner (Row1, Column1) and the lower right corner (Row2, Column2). More than one region can be created by passing a tuple of corner points. The coordinate system runs from (0,0) (upper left corner) to (Width-1,Height-1). See in this connection get_system and init_horus.


Parameters

Rectangle (output_object)
region(-array) -> object
Created rectangle.

Row1 (input_control)
rectangle.origin.y(-array) -> real / integer
Line of upper left corner point.
Default value: 30.0
Suggested values: 0.0, 10.0, 20.0, 50.0, 100.0, 200.0
Range of values: 0.0 <= Row1 <= 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0

Column1 (input_control)
rectangle.origin.x(-array) -> real / integer
Column of upper left corner point.
Default value: 20.0
Suggested values: 0.0, 10.0, 20.0, 50.0, 100.0, 200.0
Range of values: 0.0 <= Column1 <= 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0

Row2 (input_control)
rectangle.corner.y(-array) -> real / integer
Line of upper left corner point.
Default value: 100.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0, 511.0
Range of values: 0.0 <= Row2 <= 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: Row2 >= Row1

Column2 (input_control)
rectangle.corner.x(-array) -> real / integer
Column of lower right corner point.
Default value: 200.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0, 511.0
Range of values: 0.0 <= Column2 <= 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: Column2 >= Column1


Example
/* Contrast improvement in a rectangular region of interest */

read_image(:Image:'fabrik':) >
open_window(::0,0,-1,-1,'root','visible','':) >
disp_image(Image:::) >
draw_rectangle1(:::Row1,Column1,Row2,Column2) >
rectangle1(:Rectangle:Row1,Column1,Row2,Column2:) >
reduce_domain(Image,Rectangle:Mask::) >
emphasize__(Mask:Emphasize:9,9,1.0:) >
disp_image(Emphasize:::).

Result

If the parameter values are correct, the operator rectangle1 returns the value TRUE. 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__, reduce_domain


Alternatives

rectangle2, store_polygon, fill_up, store_chord, store_coord, store_lines


See also

draw_rectangle1, reduce_domain, smallest_rectangle1



Copyright © 1996-1997 MVTec Software GmbH