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

get_grayvalget_grayvalget_grayvalGetGrayvalGetGrayval (Operator)

Name

get_grayvalget_grayvalget_grayvalGetGrayvalGetGrayval — Access the gray values of an image object.

Signature

get_grayval(Image : : Row, Column : Grayval)

Herror get_grayval(const Hobject Image, const Hlong Row, const Hlong Column, double* Grayval)

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

Herror get_grayval(Hobject Image, const HTuple& Row, const HTuple& Column, double* Grayval)

Herror get_grayval(Hobject Image, const HTuple& Row, const HTuple& Column, HTuple* Grayval)

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

void HOperatorSetX.GetGrayval(
[in] IHUntypedObjectX* Image, [in] VARIANT Row, [in] VARIANT Column, [out] VARIANT* Grayval)

VARIANT HImageX.GetGrayval(
[in] VARIANT Row, [in] VARIANT Column)

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

HTuple HImage.GetGrayval(HTuple row, HTuple column)

double HImage.GetGrayval(int row, int column)

Description

The parameter GrayvalGrayvalGrayvalGrayvalgrayval is a tuple of floating point numbers, or integer numbers, respectively, which returns the gray values of several pixels of ImageImageImageImageimage. The line coordinates of the pixels are in the tuple RowRowRowRowrow, the columns in ColumnColumnColumnColumncolumn.

Attention

The type of the values of GrayvalGrayvalGrayvalGrayvalgrayval depends on the type of the gray values.

Gray values which do not belong to the image can also be accessed. The state of these gray values is not ascertained.

The operator get_grayvalget_grayvalget_grayvalGetGrayvalGetGrayval produces quite some overhead. Typically, it is used to get single gray values of an image (e.g., get_mpositionget_mpositionget_mpositionGetMpositionGetMposition followed by get_grayvalget_grayvalget_grayvalGetGrayvalGetGrayval). It is not suitable for programming image processing operations such as filters. In this case it is more useful to use the operator get_image_pointer1get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1 and to directly use the C or C++ interface for integrating own procedures.

Parallelization

Parameters

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

Image whose gray value is to be accessed.

RowRowRowRowrow (input_control)  point.y(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Line numbers of pixels to be viewed.

Default value: 0

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

Typical range of values: 0 ≤ Row Row Row Row row ≤ 32768 (lin)

Minimum increment: 1

Recommended increment: 1

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

ColumnColumnColumnColumncolumn (input_control)  point.x(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Column numbers of pixels to be viewed.

Number of elements: Column == Row

Default value: 0

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

Typical range of values: 0 ≤ Column Column Column Column column ≤ 32768 (lin)

Minimum increment: 1

Recommended increment: 1

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

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

Gray values of indicated pixels.

Number of elements: Grayval == Row

Result

If the state of the parameters is correct the operator get_grayvalget_grayvalget_grayvalGetGrayvalGetGrayval returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no input images available) is set via the operator 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

read_imageread_imageread_imageReadImageReadImage

Alternatives

get_image_pointer1get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1

See also

set_grayvalset_grayvalset_grayvalSetGrayvalSetGrayval

Module

Foundation


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