HALCON Reference Manual 10.0.2
Table of Contents / XLD / Features ClassesClassesClasses | | | Operators

test_xld_pointtest_xld_pointtest_xld_pointTestXldPointTestXldPoint (Operator)

Name

test_xld_pointtest_xld_pointtest_xld_pointTestXldPointTestXldPoint — Test whether one or more contours or polygons enclose the given point(s).

Signature

test_xld_point(XLD : : Row, Column : IsInside)

Herror test_xld_point(const Hobject XLD, double Row, double Column, Hlong* IsInside)

Herror T_test_xld_point(const Hobject XLD, const Htuple Row, const Htuple Column, Htuple* IsInside)

Herror test_xld_point(Hobject XLD, const HTuple& Row, const HTuple& Column, Hlong* IsInside)

Herror test_xld_point(Hobject XLD, const HTuple& Row, const HTuple& Column, HTuple* IsInside)

Hlong HXLD::TestXldPoint(const HTuple& Row, const HTuple& Column) const

HTuple HXLDArray::TestXldPoint(const HTuple& Row, const HTuple& Column) const

void HOperatorSetX.TestXldPoint(
[in] IHUntypedObjectX* XLD, [in] VARIANT Row, [in] VARIANT Column, [out] VARIANT* IsInside)

VARIANT HXLDX.TestXldPoint(
[in] VARIANT Row, [in] VARIANT Column)

VARIANT HXLDContX.TestXldPoint(
[in] VARIANT Row, [in] VARIANT Column)

VARIANT HXLDPolyX.TestXldPoint(
[in] VARIANT Row, [in] VARIANT Column)

VARIANT HXLDParaX.TestXldPoint(
[in] VARIANT Row, [in] VARIANT Column)

VARIANT HXLDModParaX.TestXldPoint(
[in] VARIANT Row, [in] VARIANT Column)

VARIANT HXLDExtParaX.TestXldPoint(
[in] VARIANT Row, [in] VARIANT Column)

static void HOperatorSet.TestXldPoint(HObject XLD, HTuple row, HTuple column, out HTuple isInside)

HTuple HXLD.TestXldPoint(HTuple row, HTuple column)

int HXLD.TestXldPoint(double row, double column)

Description

test_xld_pointtest_xld_pointtest_xld_pointTestXldPointTestXldPoint tests whether a test point (RowRowRowRowrow, ColumnColumnColumnColumncolumn) is enclosed by a contour or polygon XLDXLDXLDXLDXLD and returns the result in IsInsideIsInsideIsInsideIsInsideisInside. If the input point is enclosed by the contour or polygon, the return value is 1, otherwise 0. In the case of a single test point and multiple contours or polygons, the (i-1)-th element of the resulting tuple IsInsideIsInsideIsInsideIsInsideisInside indicates, whether the point is enclosed by the i-th contour or polygon. In the case of multiple test points and a single contour or polygon, the i-th element of the resulting tuple IsInsideIsInsideIsInsideIsInsideisInside indicates, whether the i-th point is enclosed by the contour or polygon. In the case of multiple test points and multiple contours or polygons, the (i-1)-th element of the resulting tuple IsInsideIsInsideIsInsideIsInsideisInside indicates, wether the (i-1)-th point is enclosed by the i-th contour or polygon (the subscription differs, because the indexing of the results tuple starts with 0 in contrast to the indexing of object tuples). In this case the number of input points must be equal to the number of contours or polygons. It is assumed that the contours or polygons are closed. If this is not the case test_xld_pointtest_xld_pointtest_xld_pointTestXldPointTestXldPoint will artificially close the contour. Nevertheless it is strongly recommended to pass only meaningful and closed contours or polygons in XLDXLDXLDXLDXLD.

Attention

If a test point is on the border of the contour or polygon, test_xld_pointtest_xld_pointtest_xld_pointTestXldPointTestXldPoint will deliver unpredictable results, i.e. the result may be 0 or 1 depending on arbitrary factors such as how the polygon is oriented with respect to the coordinate system. Note further that for points in the near proximity of the contour or polygon sides, a reliable classification is practically impossible because of numerical inaccuracies.

Parallelization

Parameters

XLDXLDXLDXLDXLD (input_object)  xld(-array) objectHXLDHXLDHXLDXHobject

Contours or polygons to be tested.

RowRowRowRowrow (input_control)  point.y(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Row coordinates of the points to be tested.

ColumnColumnColumnColumncolumn (input_control)  point.x(-array) HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Column coordinates of the points to be tested.

Number of elements: Column == Row

IsInsideIsInsideIsInsideIsInsideisInside (output_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Tuple with boolean numbers.

Result

test_xld_pointtest_xld_pointtest_xld_pointTestXldPointTestXldPoint returns 2 (H_MSG_TRUE) if the input is not empty. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

select_contours_xldselect_contours_xldselect_contours_xldSelectContoursXldSelectContoursXld, close_contours_xldclose_contours_xldclose_contours_xldCloseContoursXldCloseContoursXld, threshold_sub_pixthreshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPix

Module

Foundation


Table of Contents / XLD / Features ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH