Create a rectangle parallel to the coordinate axes.
The operator ::gen_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 ::get_system and ::reset_obj_db in this context.
|
Rectangle (output_object) |
region(-array) -> Hobject * : HRegion(Array) |
| Created rectangle. | |
|
Row1 (input_control) |
rectangle.origin.y(-array) -> HTuple.double / long |
| Line of upper left corner point. | |
| Default value: 30.0 | |
| Suggested values: 0.0, 10.0, 20.0, 50.0, 100.0, 200.0 | |
| Typical range of values: 0.0 <= Row1 <= 511.0 (lin) | |
| Minimum increment: 1.0 | |
|
Recommended increment: 10.0 | |
|
Column1 (input_control) |
rectangle.origin.x(-array) -> HTuple.double / long |
| Column of upper left corner point. | |
| Default value: 20.0 | |
| Suggested values: 0.0, 10.0, 20.0, 50.0, 100.0, 200.0 | |
| Typical range of values: 0.0 <= Column1 <= 511.0 (lin) | |
| Minimum increment: 1.0 | |
|
Recommended increment: 10.0 | |
|
Row2 (input_control) |
rectangle.corner.y(-array) -> HTuple.double / long |
| Line of lower right 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 | |
| Typical 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) -> HTuple.double / long |
| 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 | |
| Typical range of values: 0.0 <= Column2 <= 511.0 (lin) | |
| Minimum increment: 1.0 | |
|
Recommended increment: 10.0 | |
| Restriction: Column2 >= Column1 | |
/* Contrast improvement in a rectangular region of interest */
read_image(&Image,"fabrik");
open_window(0,0,-1,-1,"root","visible","",&WindowHandle);
disp_image(Image,WindowHandle);
draw_rectangle1(WindowHandle,&Row1,&Column1,&Row2,&Column2);
gen_rectangle1(&Rect,(double)Row1,(double)Column1,
(double)Row2,(double)Column2);
reduce_domain(Image,Rect,&Mask);
emphasize(Mask,&Emphasize,9,9,1.0);
disp_image(Emphasize,WindowHandle);If the parameter values are correct, the operator ::gen_rectangle1 returns the value H_MSG_TRUE. Otherwise an exception handling is raised. The clipping according to the current image format is set via the operator ::set_system('clip_region',<'true'/'false'>).
::paint_region, ::reduce_domain
::gen_rectangle2, ::gen_region_polygon, ::fill_up, ::gen_region_runs, ::gen_region_points, ::gen_region_line
::draw_rectangle1, ::reduce_domain, ::smallest_rectangle1
Region processing