get_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXldget_grayval_contour_xld (算子)

名称

get_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXldget_grayval_contour_xld — 返回 XLD 轮廓位置处的图像灰度值。

签名

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)

void GetGrayvalContourXld(const HObject& Image, const HObject& Contour, const HTuple& Interpolation, HTuple* Grayval)

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

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

HTuple HImage::GetGrayvalContourXld(const HXLDCont& Contour, const wchar_t* Interpolation) const   ( Windows only)

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

HTuple HImage.GetGrayvalContourXld(HXLDCont contour, string interpolation)

def get_grayval_contour_xld(image: HObject, contour: HObject, interpolation: str) -> Sequence[Union[int, float]]

def get_grayval_contour_xld_s(image: HObject, contour: HObject, interpolation: str) -> Union[int, float]

描述

算子 get_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXldGetGrayvalContourXldget_grayval_contour_xld returns interpolated gray values at several subpixel positions of the ImageImageImageImageimageimage. The coordinates of the positions are specified via one XLD contour ContourContourContourContourcontourcontour. The gray values are returned in GrayvalGrayvalGrayvalGrayvalgrayvalgrayval

The interpolation method can be selected via the parameter InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation:

'nearest_neighbor'"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 GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is a tuple of integer numbers. For images of type real and complex, the parameter GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is a tuple of floating point numbers.

'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear"

The parameter GrayvalGrayvalGrayvalGrayvalgrayvalgrayval 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""nearest_neighbor". Direction and cyclic images are treated like byte images.

'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic"

The parameter GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is computed using a bicubic interpolation of sixteen 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""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""bicubic_clipped"

The parameter GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is computed using a bicubic interpolation of sixteen 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""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.

Note that get_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXldGetGrayvalContourXldget_grayval_contour_xld does not take the domain of the image into account, i.e., if the domain has been reduced, e.g., with reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, gray values are returned even for points that lie outside the domain.

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

执行信息

参数

ImageImageImageImageimageimage (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)

Image whose gray values are to be accessed.

ContourContourContourContourcontourcontour (输入对象)  xld_cont objectHXLDContHObjectHXLDContHobject

Input XLD contour with the coordinates of the positions.

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

Interpolation method.

默认值: 'nearest_neighbor' "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor"

值列表: 'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic", 'bicubic_clipped'"bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped""bicubic_clipped", 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"

GrayvalGrayvalGrayvalGrayvalgrayvalgrayval (输出控制)  grayval(-array) HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Gray values of the selected image coordinates.

结果

如果参数有效,算子 get_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXldGetGrayvalContourXldget_grayval_contour_xld 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

read_imageread_imageReadImageReadImageReadImageread_image, draw_xlddraw_xldDrawXldDrawXldDrawXlddraw_xld, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXldgen_contour_polygon_xld, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix

替代

get_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedget_grayval_interpolated

模块

基础