get_grayvalT_get_grayvalGetGrayvalGetGrayvalget_grayval (算子名称)

名称

get_grayvalT_get_grayvalGetGrayvalGetGrayvalget_grayval — Access the gray values of an image object.

参数签名

get_grayval(Image : : Row, Column : Grayval)

Herror T_get_grayval(const Hobject Image, const Htuple Row, const Htuple Column, Htuple* Grayval)

void GetGrayval(const HObject& Image, const HTuple& Row, const HTuple& Column, HTuple* Grayval)

HTuple HImage::GetGrayval(const HTuple& Row, const HTuple& Column) const

HTuple HImage::GetGrayval(Hlong Row, Hlong Column) const

static void HOperatorSet.GetGrayval(HObject image, HTuple row, HTuple column, out HTuple grayval)

HTuple HImage.GetGrayval(HTuple row, HTuple column)

HTuple HImage.GetGrayval(int row, int column)

def get_grayval(image: HObject, row: MaybeSequence[int], column: MaybeSequence[int]) -> Sequence[Union[int, float]]

描述

The parameter GrayvalGrayvalGrayvalGrayvalgrayvalgrayval is a tuple of floating point numbers or integer numbers which returns the gray values of several pixels of ImageImageImageImageimageimage. For a multi-channel image, a group of elements, in particular one value for each channel (or two values for each channel for complex or vector field images), is returned for each pixel. The row coordinates of the pixels are specified in the tuple RowRowRowRowrowrow, the column coordinates are specified in the tuple ColumnColumnColumnColumncolumncolumn.

Note that get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval 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.

注意

The type of the values of GrayvalGrayvalGrayvalGrayvalgrayvalgrayval depends on the type of the gray values of the channels of the image ImageImageImageImageimageimage. The operator get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval produces quite some overhead. Typically, it is used to get single gray values of an image (e.g., get_mpositionget_mpositionGetMpositionGetMpositionGetMpositionget_mposition followed by get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval). It is not suitable for programming image processing operations such as filters. In this case it is more useful to use 该算子 get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1get_image_pointer1 and to directly use the C or C++ interface for integrating own procedures.

运行信息

参数表

ImageImageImageImageimageimage (input_object)  (multichannel-)image objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Image whose gray value is to be accessed.

RowRowRowRowrowrow (input_control)  point.y(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinates of pixels to be viewed.

Default: 0

Suggested values: 0, 64, 128, 256, 512, 1024

Value range: 0 ≤ Row Row Row Row row row ≤ 32767 (lin)

Minimum increment: 1

Recommended increment: 1

Restriction: 0 <= Row && Row < height(Image)

ColumnColumnColumnColumncolumncolumn (input_control)  point.x(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinates of pixels to be viewed.

Number of elements: Column == Row

Default: 0

Suggested values: 0, 64, 128, 256, 512, 1024

Value range: 0 ≤ Column Column Column Column column column ≤ 32767 (lin)

Minimum increment: 1

Recommended increment: 1

Restriction: 0 <= Column && Column < width(Image)

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

Gray values of indicated pixels.

结果

If the state of the parameters is correct, 该算子 get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval 返回值 2 ( H_MSG_TRUE) . The behavior in case of empty input (no input images available) is 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>). If necessary, an exception is raised.

可能的前置算子

read_imageread_imageReadImageReadImageReadImageread_image

可替代算子

get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1get_image_pointer1, get_grayval_interpolatedget_grayval_interpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedGetGrayvalInterpolatedget_grayval_interpolated, get_grayval_contour_xldget_grayval_contour_xldGetGrayvalContourXldGetGrayvalContourXldGetGrayvalContourXldget_grayval_contour_xld

参考其它

set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval

模块

Foundation