HALCON Reference Manual 10.0.2
Table of Contents / Image / Access ClassesClassesClasses | | | Operators

get_grayval_contour_xldget_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXld (Operator)

Name

get_grayval_contour_xldget_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXld — Return gray values of an image at the positions of an XLD contour.

Signature

get_grayval_contour_xld(Image, Contour : : Interpolation : Grayval)

Herror get_grayval_contour_xld(const Hobject Image, const Hobject Contour, const char* Interpolation, double* Grayval)

Herror T_get_grayval_contour_xld(const Hobject Image, const Hobject Contour, const Htuple Interpolation, Htuple* Grayval)

Herror get_grayval_contour_xld(Hobject Image, Hobject Contour, const HTuple& Interpolation, double* Grayval)

Herror get_grayval_contour_xld(Hobject Image, Hobject Contour, const HTuple& Interpolation, HTuple* Grayval)

HTuple HImage::GetGrayvalContourXld(const HXLDCont& Contour, const HTuple& Interpolation) const

void HOperatorSetX.GetGrayvalContourXld(
[in] IHUntypedObjectX* Image, [in] IHUntypedObjectX* Contour, [in] VARIANT Interpolation, [out] VARIANT* Grayval)

VARIANT HImageX.GetGrayvalContourXld(
[in] IHXLDContX* Contour, [in] BSTR Interpolation)

static void HOperatorSet.GetGrayvalContourXld(HObject image, HObject contour, HTuple interpolation, out HTuple grayval)

HTuple HImage.GetGrayvalContourXld(HXLDCont contour, string interpolation)

Description

The operator get_grayval_contour_xldget_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXld returns interpolated gray values at several subpixel positions of the ImageImageImageImageimage. The coordinates of the positions are specified via one XLD contour ContourContourContourContourcontour. The gray values are returned in GrayvalGrayvalGrayvalGrayvalgrayval.

The interpolation method can be selected via the parameter InterpolationInterpolationInterpolationInterpolationinterpolation:

'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor":

The results are the gray values of the nearest pixels to the selected coordinates. For images of type byte, direction, cyclic, uint2, int1, int2, int4, and int8, the parameter GrayvalGrayvalGrayvalGrayvalgrayval is a tuple of integer numbers. For images of type real and complex, the parameter GrayvalGrayvalGrayvalGrayvalgrayval is a tuple of floating point numbers.

'bilinear'"bilinear""bilinear""bilinear""bilinear":

The parameter GrayvalGrayvalGrayvalGrayvalgrayval is computed using a bilinear interpolation of the four neighboring gray values of the selected coordinates. The result is a tuple of floating point numbers. The runtime increases significantly compared to 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor". Direction and cyclic images are treated like byte images.

'bicubic'"bicubic""bicubic""bicubic""bicubic":

The parameter GrayvalGrayvalGrayvalGrayvalgrayval is computed using a bicubic interpolation of the four neighboring gray values of the selected coordinates. The result is a tuple of floating point numbers. The runtime increases significantly compared to 'bilinear'"bilinear""bilinear""bilinear""bilinear". Direction and cyclic images are treated like byte images. In this mode, the resulting gray values may contain values that lie outside of the range of numbers that can be represented by the input image type.

'bicubic_clipped'"bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped":

The parameter GrayvalGrayvalGrayvalGrayvalgrayval is computed using a bicubic interpolation of the four neighboring gray values of the selected coordinates. The result is a tuple of floating point numbers. The runtime increases significantly compared to 'bilinear'"bilinear""bilinear""bilinear""bilinear". Direction and cyclic images are treated like byte images. In this mode, resulting gray values that lie outside of the range of numbers that can be represented by the input image type are clipped to that range.

Please note that each point of the XLD contour must be in the range -0.5 <= row coordinate < height(ImageImageImageImageimage)-0.5 and -0.5 <= column coordinate < width(ImageImageImageImageimage)-0.5.

Parallelization

Parameters

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)

Image whose gray values are to be accessed.

ContourContourContourContourcontour (input_object)  xld_cont objectHXLDContHXLDContHXLDContXHobject

Input XLD contour with the coordinates of the positions.

InterpolationInterpolationInterpolationInterpolationinterpolation (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Interpolation method.

Default value: 'nearest_neighbor' "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor"

List of values: 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor", 'bilinear'"bilinear""bilinear""bilinear""bilinear", 'bicubic'"bicubic""bicubic""bicubic""bicubic", 'bicubic_clipped'"bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped"

GrayvalGrayvalGrayvalGrayvalgrayval (output_control)  grayval(-array) HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Gray values of the selected image coordinates.

Result

If the parameters are valid, the operator get_grayval_contour_xldget_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXld returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

read_imageread_imageread_imageReadImageReadImage, draw_xlddraw_xlddraw_xldDrawXldDrawXld, gen_contour_polygon_xldgen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXld, edges_sub_pixedges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPix

Alternatives

get_grayval_interpolatedget_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolated

Module

Foundation


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