shape_trans_xldshape_trans_xldShapeTransXldShapeTransXldshape_trans_xld (算子)

名称

shape_trans_xldshape_trans_xldShapeTransXldShapeTransXldshape_trans_xld — 变换轮廓或多边形的形状。

签名

shape_trans_xld(XLD : XLDTrans : Type : )

Herror shape_trans_xld(const Hobject XLD, Hobject* XLDTrans, const char* Type)

Herror T_shape_trans_xld(const Hobject XLD, Hobject* XLDTrans, const Htuple Type)

void ShapeTransXld(const HObject& XLD, HObject* XLDTrans, const HTuple& Type)

HXLD HXLD::ShapeTransXld(const HString& Type) const

HXLD HXLD::ShapeTransXld(const char* Type) const

HXLD HXLD::ShapeTransXld(const wchar_t* Type) const   ( Windows only)

HXLDCont HXLDCont::ShapeTransXld(const HString& Type) const

HXLDCont HXLDCont::ShapeTransXld(const char* Type) const

HXLDCont HXLDCont::ShapeTransXld(const wchar_t* Type) const   ( Windows only)

HXLDPoly HXLDPoly::ShapeTransXld(const HString& Type) const

HXLDPoly HXLDPoly::ShapeTransXld(const char* Type) const

HXLDPoly HXLDPoly::ShapeTransXld(const wchar_t* Type) const   ( Windows only)

HXLDPara HXLDPara::ShapeTransXld(const HString& Type) const

HXLDPara HXLDPara::ShapeTransXld(const char* Type) const

HXLDPara HXLDPara::ShapeTransXld(const wchar_t* Type) const   ( Windows only)

HXLDModPara HXLDModPara::ShapeTransXld(const HString& Type) const

HXLDModPara HXLDModPara::ShapeTransXld(const char* Type) const

HXLDModPara HXLDModPara::ShapeTransXld(const wchar_t* Type) const   ( Windows only)

HXLDExtPara HXLDExtPara::ShapeTransXld(const HString& Type) const

HXLDExtPara HXLDExtPara::ShapeTransXld(const char* Type) const

HXLDExtPara HXLDExtPara::ShapeTransXld(const wchar_t* Type) const   ( Windows only)

static void HOperatorSet.ShapeTransXld(HObject XLD, out HObject XLDTrans, HTuple type)

HXLD HXLD.ShapeTransXld(string type)

HXLDCont HXLDCont.ShapeTransXld(string type)

HXLDPoly HXLDPoly.ShapeTransXld(string type)

HXLDPara HXLDPara.ShapeTransXld(string type)

HXLDModPara HXLDModPara.ShapeTransXld(string type)

HXLDExtPara HXLDExtPara.ShapeTransXld(string type)

def shape_trans_xld(xld: HObject, type: str) -> HObject

描述

shape_transshape_transShapeTransShapeTransShapeTransshape_trans transforms the input contours or polygons depending on the parameter TypeTypeTypeTypetypetype:

'convex'

Convex hull.

'ellipse'

Ellipse with the same moments and area as the input contour or polygon. The closed input contour or polygon must not intersect itself, otherwise the resulting ellipse is not meaningful(Whether the input contour or polygon intersects itself or not can be determined with test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xld).

'outer_circle'

Smallest enclosing circle.

'rectangle1'

Smallest enclosing rectangle parallel to the coordinate axes.

'rectangle2'

Smallest enclosing rectangle.

执行信息

参数

XLDXLDXLDXLDXLDxld (输入对象)  xld(-array) objectHXLDHObjectHXLDHobject

Contours or polygons to be transformed.

XLDTransXLDTransXLDTransXLDTransXLDTransxldtrans (输出对象)  xld(-array) objectHXLDHObjectHXLDHobject *

Transformed contours respectively polygons.

TypeTypeTypeTypetypetype (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of transformation.

默认值: 'convex' "convex" "convex" "convex" "convex" "convex"

值列表: 'convex'"convex""convex""convex""convex""convex", 'ellipse'"ellipse""ellipse""ellipse""ellipse""ellipse", 'outer_circle'"outer_circle""outer_circle""outer_circle""outer_circle""outer_circle", 'rectangle1'"rectangle1""rectangle1""rectangle1""rectangle1""rectangle1", 'rectangle2'"rectangle2""rectangle2""rectangle2""rectangle2""rectangle2"

结果

shape_trans_xldshape_trans_xldShapeTransXldShapeTransXldShapeTransXldshape_trans_xld 在所有参数正确时返回 2 ( H_MSG_TRUE )。 The behavior in case of empty input (no contours given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。

可能的前趋

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix, threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXldgen_contour_polygon_xld, test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xld

替代

smallest_circle_xldsmallest_circle_xldSmallestCircleXldSmallestCircleXldSmallestCircleXldsmallest_circle_xld, smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1XldSmallestRectangle1Xldsmallest_rectangle1_xld, smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld, elliptic_axis_xldelliptic_axis_xldEllipticAxisXldEllipticAxisXldEllipticAxisXldelliptic_axis_xld

另见

smallest_circle_xldsmallest_circle_xldSmallestCircleXldSmallestCircleXldSmallestCircleXldsmallest_circle_xld, smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1XldSmallestRectangle1Xldsmallest_rectangle1_xld, smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld, elliptic_axis_xldelliptic_axis_xldEllipticAxisXldEllipticAxisXldEllipticAxisXldelliptic_axis_xld

模块

基础