height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXld — 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_xldHeightWidthRatioXldHeightWidthRatioXldHeightWidthRatioXld 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
(Row1Row1Row1Row1row1,Column1Column1Column1Column1column1,Row2Row2Row2Row2row2,Column2Column2Column2Column2column2)
(see smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1XldSmallestRectangle1Xld). Based on these values,
height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXldHeightWidthRatioXld 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_systemSetSystemSetSystemSetSystem).