Largest inner circle of a region.
The operator inner_circle determines the largest inner circle of a region, i.e. the circle with the largest area of all circles that fit into the region. For this circle the center (Row,Column) and the radius (Radius) are calculated. The output of the procedure is chosen in such a way that it can be used as input for the HORUS procedures disp_circle and circle. If several regions are passed in Regions corresponding tuples are returned as output parameters. In case of empty region all parameters have the value 0.0 if no other behavior was set (see set_system).
If several inner circles are present at a region only one solution is returned.
Regions (input_object) |
region(-array) -> object |
Regions to be examined. |
Row (output_control) |
circle.center.y(-array) -> real |
Line index of the center. |
Column (output_control) |
circle.center.x(-array) -> real |
Column index of the center. |
Radius (output_control) |
circle.radius(-array) -> real |
Radius of the inner circle. | |
Assertion: Radius >= 0 |
read_image(:Image:'fabrik':) > open_window(::0,0,-1,-1,'root','visible','':) > regiongrowing__(Image:Seg:5,5,6,100:) > select_shape(Seg:H:'area','and',100,2000:) > inner_circle(H:::Row,Column,Radius) > circle(:Circles:Row,Column,Radius:) > set_draw(::'margin':) > disp_region(Circles:::).
If F is the area of the region and R is the radius of the inner circle the runtime complexity is O(F * R).
The operator inner_circle returns the value TRUE if the input is not empty. The behavior in case of empty input (no input regions available) is set via the operator set_system(::'no_object_result',<Result>:), the behavior in case of empty region is set via set_system(::'empty_region_result',<Result>:). If necessary an exception is raised.
threshold__, regiongrowing__, connection, fetch_chord
set_shape, select_shape, smallest_circle