get_image_pointer3get_image_pointer3GetImagePointer3GetImagePointer3get_image_pointer3 (算子)
名称
get_image_pointer3get_image_pointer3GetImagePointer3GetImagePointer3get_image_pointer3 — 访问彩色图像的指针。
签名
Herror get_image_pointer3(const Hobject ImageRGB, Hlong* PointerRed, Hlong* PointerGreen, Hlong* PointerBlue, char* Type, Hlong* Width, Hlong* Height)
Herror T_get_image_pointer3(const Hobject ImageRGB, Htuple* PointerRed, Htuple* PointerGreen, Htuple* PointerBlue, Htuple* Type, Htuple* Width, Htuple* Height)
void GetImagePointer3(const HObject& ImageRGB, HTuple* PointerRed, HTuple* PointerGreen, HTuple* PointerBlue, HTuple* Type, HTuple* Width, HTuple* Height)
void HImage::GetImagePointer3(HTuple* PointerRed, HTuple* PointerGreen, HTuple* PointerBlue, HTuple* Type, HTuple* Width, HTuple* Height) const
void HImage::GetImagePointer3(void** PointerRed, void** PointerGreen, void** PointerBlue, HString* Type, Hlong* Width, Hlong* Height) const
static void HOperatorSet.GetImagePointer3(HObject imageRGB, out HTuple pointerRed, out HTuple pointerGreen, out HTuple pointerBlue, out HTuple type, out HTuple width, out HTuple height)
void HImage.GetImagePointer3(out HTuple pointerRed, out HTuple pointerGreen, out HTuple pointerBlue, out HTuple type, out HTuple width, out HTuple height)
void HImage.GetImagePointer3(out IntPtr pointerRed, out IntPtr pointerGreen, out IntPtr pointerBlue, out string type, out int width, out int height)
def get_image_pointer3(image_rgb: HObject) -> Tuple[Sequence[int], Sequence[int], Sequence[int], Sequence[str], Sequence[int], Sequence[int]]
def get_image_pointer3_s(image_rgb: HObject) -> Tuple[int, int, int, str, int, int]
描述
算子 get_image_pointer3get_image_pointer3GetImagePointer3GetImagePointer3GetImagePointer3get_image_pointer3 returns a C pointer to
the three channels of a colored image (ImageRGBImageRGBImageRGBImageRGBimageRGBimage_rgb).
Additionally the image type (TypeTypeTypeTypetypetype = 'byte', 'int2','float' etc.)
and the image size (WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight) 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.
注意
Only one image can be passed.
The operator get_image_pointer3get_image_pointer3GetImagePointer3GetImagePointer3GetImagePointer3get_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).
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ImageRGBImageRGBImageRGBImageRGBimageRGBimage_rgb (输入对象) multichannel-image(-array) → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)
输入图像。
PointerRedPointerRedPointerRedPointerRedpointerRedpointer_red (输出控制) pointer(-array) → HTupleSequence[int]HTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)
Pointer to the pixels of the first channel.
PointerGreenPointerGreenPointerGreenPointerGreenpointerGreenpointer_green (输出控制) pointer(-array) → HTupleSequence[int]HTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)
Pointer to the pixels of the second channel.
PointerBluePointerBluePointerBluePointerBluepointerBluepointer_blue (输出控制) pointer(-array) → HTupleSequence[int]HTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)
Pointer to the pixels of the third channel.
TypeTypeTypeTypetypetype (输出控制) string(-array) → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Type of image.
值列表:
'byte'"byte""byte""byte""byte""byte", 'complex'"complex""complex""complex""complex""complex", 'cyclic'"cyclic""cyclic""cyclic""cyclic""cyclic", 'direction'"direction""direction""direction""direction""direction", 'int1'"int1""int1""int1""int1""int1", 'int2'"int2""int2""int2""int2""int2", 'int4'"int4""int4""int4""int4""int4", 'int8'"int8""int8""int8""int8""int8", 'real'"real""real""real""real""real", 'uint2'"uint2""uint2""uint2""uint2""uint2", 'vector_field_absolute'"vector_field_absolute""vector_field_absolute""vector_field_absolute""vector_field_absolute""vector_field_absolute", 'vector_field_relative'"vector_field_relative""vector_field_relative""vector_field_relative""vector_field_relative""vector_field_relative"
WidthWidthWidthWidthwidthwidth (输出控制) extent.x(-array) → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width of image.
HeightHeightHeightHeightheightheight (输出控制) extent.y(-array) → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Height of image.
结果
算子 get_image_pointer3get_image_pointer3GetImagePointer3GetImagePointer3GetImagePointer3get_image_pointer3 返回值 2 (
H_MSG_TRUE)
if
exactly one image is passed.当输入为空(无可用输入图像)时可设置行为通过算子 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>)。如有必要,则抛出异常。
可能的前趋
read_imageread_imageReadImageReadImageReadImageread_image
替代
set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval,
get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval,
get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1get_image_pointer1
另见
paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region,
paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray
模块
基础