Skip to content

interleave_channelsInterleaveChannelsInterleaveChannelsinterleave_channelsinterleave_channels🔗

説明🔗

interleave_channelsInterleaveChannelsInterleaveChannelsinterleave_channelsinterleave_channels — 複数チャンネル画像からインターリーブした画像を作成する。

書式🔗

interleave_channels( image MultichannelImage, out image InterleavedImage, string PixelFormat, integer RowBytes, integer Alpha )void InterleaveChannels( const HObject& MultichannelImage, HObject* InterleavedImage, const HTuple& PixelFormat, const HTuple& RowBytes, const HTuple& Alpha )static void HOperatorSet.InterleaveChannels( HObject multichannelImage, out HObject interleavedImage, HTuple pixelFormat, HTuple rowBytes, HTuple alpha )def interleave_channels( multichannel_image: HObject, pixel_format: str, row_bytes: Union[str, int], alpha: int ) -> HObject

Herror interleave_channels( const Hobject MultichannelImage, Hobject* InterleavedImage, const char* PixelFormat, const char* RowBytes, const Hlong Alpha )

Herror T_interleave_channels( const Hobject MultichannelImage, Hobject* InterleavedImage, const Htuple PixelFormat, const Htuple RowBytes, const Htuple Alpha )

HImage HImage::InterleaveChannels( const HString& PixelFormat, const HTuple& RowBytes, Hlong Alpha ) const

HImage HImage::InterleaveChannels( const HString& PixelFormat, const HString& RowBytes, Hlong Alpha ) const

HImage HImage::InterleaveChannels( const char* PixelFormat, const char* RowBytes, Hlong Alpha ) const

HImage HImage::InterleaveChannels( const wchar_t* PixelFormat, const wchar_t* RowBytes, Hlong Alpha ) const (Windows only)

HImage HImage.InterleaveChannels( string pixelFormat, HTuple rowBytes, int alpha )

HImage HImage.InterleaveChannels( string pixelFormat, string rowBytes, int alpha )

説明🔗

オペレーター interleave_channelsInterleaveChannels は、4 つまたは 3 つのチャ ンネルを含む入力 MultichannelImagemultichannelImagemultichannel_image から InterleavedImageinterleavedImageinterleaved_image を作成します。.NET Bitmap に変換するな ど、カラー画像を視覚化するための準備に便利です。

Pixelformat🔗

PixelFormatpixelFormatpixel_format で指定される InterleavedImageinterleavedImageinterleaved_image 内のピクセル形式。 使用可能な形式は、 'rgb'"rgb"、'rgba'"rgba"、'argb'"argb"、'bgr'"bgr"、 'bgra'"bgra"、'abgr'"abgr" などのbyte画像と、'rgb48'"rgb48"、 'bgr48'"bgr48"、 'rgba64'"rgba64"、 'bgra64'"bgra64"、 'argb64'"argb64"、 'abgr64'"abgr64"などのuint2画像です。’a’ は、4 番目(’alpha’)チャン ネルを示します。 gen_image_interleavedGenImageInterleaved とは異なり、PixelFormatpixelFormatpixel_format で は LittleEndian バイト順序が使用されます。

アルファチャンネル🔗

アルファチャンネルは次の方法で定義できます。

チャンネル ドメイン
3 指定なし/全体 完全な画像に対してAlphaalphaalpha の値が設定されます。
3 指定あり ドメイン内部: アルファは Alphaalphaalpha に設定されます。 ドメイン外部: アルファはゼロに設定されます。
4 アルファは 4 番目のチャンネルの対応する値に設定され、 ドメインと Alphaalphaalpha は無視されます

行のアライメント🔗

出力画像の 2 行の先頭間のバイト数は、特定のアライメント基準を満たすように RowBytesrowBytesrow_bytes で設定できます。 パディングが必要ない場合は、RowBytesrowBytesrow_bytes を 'match'"match" に設 定します。RowBytesrowBytesrow_bytes は、MultichannelImagemultichannelImagemultichannel_imageの幅の PixelFormatpixelFormatpixel_format 倍のバイト数以上にする必要があります。

実行情報🔗

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

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

  • 内部データレベルで自動的に並列演算処理を実施

パラメーター🔗

MultichannelImagemultichannelImagemultichannel_image (input_object) multichannel-image → object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)

入力複数チャンネル画像

InterleavedImageinterleavedImageinterleaved_image (output_object) singlechannelimage → object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject * (byte)

出力インターリーブ画像

PixelFormatpixelFormatpixel_format (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

InterleavedImage のターゲット形式

初期値: 'rgba'"rgba"
値のリスト: 'abgr', 'abgr64', 'argb', 'argb64', 'bgr', 'bgr48', 'bgra', 'bgra64', 'rgb', 'rgb48', 'rgba', 'rgba64'"abgr", "abgr64", "argb", "argb64", "bgr", "bgr48", "bgra", "bgra64", "rgb", "rgb48", "rgba", "rgba64"

RowBytesrowBytesrow_bytes (input_control) integer → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)Union[str, int]Htuple (char* / Hlong)

出力画像の行内のバイト数

初期値: 'match'"match"
推奨値: 'match'"match"

Alphaalphaalpha (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

3 つのチャンネル入力画像のアルファ値

初期値: 255255
推奨値: 255, 0255, 0

例🔗

(c#)

  HTuple type, width, height\;
  HImage patras = new HImage("patras")\;
 HImage interleaved = patras.InterleaveChannels("argb", "match", 255)\;
  IntPtr ptr = interleaved.GetImagePointer1(out type, out width, out height)\;
 Image img = new Bitmap(width/4, height, width,
                         PixelFormat.Format32bppArgb, ptr)\;
 pictureBox.Image = img\;

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

組み合わせ

関連項目

gen_image_interleavedGenImageInterleaved

モジュール🔗

Foundation