| Table of Contents / Image / Access | Operators |
get_grayval — Access the gray values of an image object.
The parameter Grayval is a tuple of floating point numbers, or integer numbers, respectively, which returns the gray values of several pixels of Image. The line coordinates of the pixels are in the tuple Row, the columns in Column.
The type of the values of Grayval 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_grayval produces quite some overhead. Typically, it is used to get single gray values of an image (e.g., get_mposition followed by get_grayval). 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_pointer1 and to directly use the C or C++ interface for integrating own procedures.
Image whose gray value is to be accessed.
Line numbers of pixels to be viewed.
Default value: 0
Suggested values: 0, 64, 128, 256, 512, 1024
Typical range of values: 0 ≤ Row ≤ 32768 (lin)
Minimum increment: 1
Recommended increment: 1
Restriction: (0 <= Row) && (Row < height(Image))
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 ≤ 32768 (lin)
Minimum increment: 1
Recommended increment: 1
Restriction: (0 <= Column) && (Column < width(Image))
Gray values of indicated pixels.
Number of elements: Grayval == Row
If the state of the parameters is correct the operator get_grayval 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>). If necessary an exception is raised.
Foundation
| Table of Contents / Image / Access | Operators |
| HALCON Reference Manual 10.0.2 | Copyright © 1996-2011 MVTec Software GmbH |