height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXldheight_width_ratio_xld — Compute the width, height, and aspect ratio of the enclosing
rectangle parallel to the coordinate axes of contours or polygons.
The operator height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXldheight_width_ratio_xld calculates the enclosing
rectangle (parallel to the coordinate axes) for each input contour
or polygon. The enclosing rectangle is described by the coordinates
of the corner pixels
(Row1Row1Row1row1row_1,Column1Column1Column1column1column_1,Row2Row2Row2row2row_2,Column2Column2Column2column2column_2)
(see smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1Xldsmallest_rectangle1_xld). Based on these values,
height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXldheight_width_ratio_xld computes the width, height, and
aspect ratio of the smallest surrounding rectangle as follows:
If more than one contour or polygon is passed, the results are
stored in tuples in the same order as the respective contours or
polygons in XLDXLDXLDXLDxld. In case of an empty contour all parameters
have the value 0 if no other behavior was set (see
set_systemset_systemSetSystemSetSystemset_system).