Skip to content

get_image_pointer3GetImagePointer3GetImagePointer3get_image_pointer3get_image_pointer3🔗

説明🔗

get_image_pointer3GetImagePointer3GetImagePointer3get_image_pointer3get_image_pointer3 — カラー画像のポインタにアクセスする。

書式🔗

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 )void GetImagePointer3( const HObject& ImageRGB, HTuple* PointerRed, HTuple* PointerGreen, HTuple* PointerBlue, HTuple* Type, HTuple* Width, HTuple* Height )static void HOperatorSet.GetImagePointer3( HObject imageRGB, out HTuple pointerRed, out HTuple pointerGreen, out HTuple pointerBlue, out HTuple type, out HTuple width, out HTuple 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]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 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

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 )

説明🔗

オペレーター get_image_pointer3GetImagePointer3 は、カラー画像( ImageRGBimageRGBimage_rgb )の3つのチャンネルに対するポインタを返します。 さらに、画像のデータ型 (Typetypetype = ‘byte’, ‘int2’,’float’ など) と画 像のサイズ (Widthwidthwidth と Heightheightheight) を返します。 したがって、そのポインタを利用してHALCONホスト言語から HALCONデータ ベース内の画像データへの直接アクセスが可能となります。 画像は画像ラインのベクトルとしてHALCON内に格納されます。 データ型が’complex’,’vector_type’の画像は特殊な方法で処理されることに注意 してください。特に’complex’画像は実数と虚数が交互に処理されます。 一方、’vector_field’画像は2つの行列で構成されており、1つは行(row)、もう1つは 列(column)の情報です。 これらはHALCONのデータベース上に順に格納されます。 3つのチャンネルは、同じデータ型ならびに同じサイズを持たなければなりません。

注意🔗

画像を 1 つのみ渡すことができます。 オペレーター get_image_pointer3GetImagePointer3 は新しく生成された画像への エントリとしてのみ使用されるべきです。なぜなら、他の画像のグレイ値 が上書きされてしまうためです(関連構造を参照してください)。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

ImageRGBimageRGBimage_rgb (input_object) multichannel-image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

入力画像

PointerRedpointerRedpointer_red (output_control) pointer(-array) → (integer)HTuple (Hlong)HTuple (IntPtr)Sequence[int]Htuple (Hlong)

最初のチャンネルのピクセルへのポインタ

PointerGreenpointerGreenpointer_green (output_control) pointer(-array) → (integer)HTuple (Hlong)HTuple (IntPtr)Sequence[int]Htuple (Hlong)

2番目のチャンネルのピクセルへのポインタ

PointerBluepointerBluepointer_blue (output_control) pointer(-array) → (integer)HTuple (Hlong)HTuple (IntPtr)Sequence[int]Htuple (Hlong)

3番目のチャンネルのピクセルへのポインタ

Typetypetype (output_control) string(-array) → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

画像の型

値のリスト: 'byte', 'complex', 'cyclic', 'direction', 'int1', 'int2', 'int4', 'int8', 'real', 'uint2', 'vector_field_absolute', 'vector_field_relative'"byte", "complex", "cyclic", "direction", "int1", "int2", "int4", "int8", "real", "uint2", "vector_field_absolute", "vector_field_relative"

Widthwidthwidth (output_control) extent.x(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

画像の幅

Heightheightheight (output_control) extent.y(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

画像の高さ

結果🔗

正しく画像が渡されると、オペレーター get_image_pointer3GetImagePointer3 は、値 2 (H_MSG_TRUE) を返します。 入力が空だった場合(入力画像が得られない場合)の動作は、オペレー ター set_system('no_object_result',<Result>) で設定されま す。 必要に応じて、例外処理が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

read_imageReadImage

他の選択候補

set_grayvalSetGrayval, get_grayvalGetGrayval, get_image_pointer1GetImagePointer1

関連項目

paint_regionPaintRegion, paint_grayPaintGray

モジュール🔗

Foundation