Compute the orientation and major axes of a region in a gray value image.
The operator elliptic_axis_gray calculates the length of the axes and the orientation of the ellipse having the ``same orientation'' and the ``aspect ratio'' as the input region. Several input regions can be passed in Regions as tuples. The length of the major axis Ra and the minor axis Rb as well as the orientation of the major axis with regard to the x-axis (Phi) are determined. The angle is returned in radians. The calculation is done analogously to elliptic_axis. The only difference is that in elliptic_axis_gray the gray value moments are used instead of the region moments. The gray value moments are derived from the input image Image. For the definition of the gray value moments, see area_center_gray.
|
Regions (input_object) |
region(-array) -> object |
| Region(s) to be examined. | |
|
Image (input_object) |
singlechannelimage -> object : byte / direction / cyclic / int1 / int2 / uint2 / int4 / real |
| Gray value image. | |
|
Ra (output_control) |
real(-array) -> real |
| Major axis of the region. | |
|
Rb (output_control) |
real(-array) -> real |
| Minor axis of the region. | |
|
Phi (output_control) |
angle.rad(-array) -> real |
| Angle enclosed by the major axis and the x-axis. | |
elliptic_axis_gray returns 2 (H_MSG_TRUE) if all parameters are correct and no error occurs during execution. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:). If necessary, an exception handling is raised.
elliptic_axis_gray is reentrant and automatically parallelized (on tuple level).
threshold, regiongrowing, connection
Foundation