Transform the shape of a region.
::shape_trans transforms the shape of the input regions depending on the parameter Type:
'convex'
Convex hull.
'ellipse'
Ellipse with the same moments and area as the input region.
'outer_circle'
Smallest enclosing circle.
'inner_circle'
Largest circle fitting into the region.
'rectangle1'
Smallest enclosing rectangle parallel to the coordinate axes.
'rectangle2'
Smallest enclosing rectangle.
'inner_center'
The point on the skeleton of the input region having the
smallest distance to the center of gravity of the input
region.
|
Region (input_object) |
region(-array) -> Hobject: HRegion(Array) |
| Regions to be transformed. | |
|
RegionTrans (output_object) |
region(-array) -> Hobject * : HRegion(Array) |
| Transformed regions. | |
|
Type (input_control) |
string -> HTuple.char * |
| Type of transformation. | |
| Default value: 'convex' | |
| List of values: 'convex', 'ellipse', 'outer_circle', 'inner_circle', 'rectangle1', 'rectangle2', 'inner_center' | |
Let F be the area of the input region. Then the runtime complexity is O(F).
::shape_trans returns H_MSG_TRUE if all parameters are correct. The behavior in case of empty input (no regions given) can be set via ::set_system('no_object_result',<Result>). If necessary, an exception handling is raised.
::disp_region, ::regiongrowing_mean, ::area_center
::convexity, ::elliptic_axis, ::area_center, ::smallest_rectangle1, ::smallest_rectangle2, ::set_shape, ::select_shape, ::inner_circle
Region processing