get_image_pointer3๐
Short description๐
get_image_pointer3 โ Access the pointers of a colored image.
Signature๐
get_image_pointer3( image ImageRGB, out pointer PointerRed, out pointer PointerGreen, out pointer PointerBlue, out string Type, out extent.x Width, out extent.y Height )
Description๐
The operator get_image_pointer3 returns a C pointer to
the three channels of a colored image (ImageRGB).
Additionally the image type (Type = โbyteโ, โint2โ,โfloatโ etc.)
and the image size (Width and Height) are returned.
Consequently a direct access to the image data in the
HALCON database from the HALCON host language via the pointer is possible.
An image is stored in HALCON as a vector of image lines.
The image types โcomplexโ and โvector_typeโ are handled in a specific way.
In particular, โcomplexโ images are interleaved, i.e., the real and the
imaginary parts are alternating, whereas โvector_fieldโ images consist of
two matrices, one for the rows and one for the columns, which are stored in
the HALCON database one after the other.
The three channels must have the same pixel type and the same size.
Attention๐
Only one image can be passed.
The operator get_image_pointer3 should only be used for entry
into newly created images, since otherwise the gray values of other images
might be overwritten (see relational structure).
Execution information๐
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters๐
ImageRGB (input_object) multichannel-image(-array) โ object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)
Input image.
PointerRed (output_control) pointer(-array) โ (integer)
Pointer to the pixels of the first channel.
PointerGreen (output_control) pointer(-array) โ (integer)
Pointer to the pixels of the second channel.
PointerBlue (output_control) pointer(-array) โ (integer)
Pointer to the pixels of the third channel.
Type (output_control) string(-array) โ (string)
Type of image.
List of values: 'byte', 'complex', 'cyclic', 'direction', 'int1', 'int2', 'int4', 'int8', 'real', 'uint2', 'vector_field_absolute', 'vector_field_relative'
Width (output_control) extent.x(-array) โ (integer)
Width of image.
Height (output_control) extent.y(-array) โ (integer)
Height of image.
Result๐
The operator get_image_pointer3 returns the value 2 (H_MSG_TRUE) if
exactly one image is passed.
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.
Combinations with other operators๐
Combinations
Possible predecessors
Alternatives
set_grayval, get_grayval, get_image_pointer1
See also
Module๐
Foundation