Skip to content

create_dl_transform_resizeCreateDlTransformResizeCreateDlTransformResizecreate_dl_transform_resizeT_create_dl_transform_resize🔗

説明🔗

create_dl_transform_resizeCreateDlTransformResizeCreateDlTransformResizecreate_dl_transform_resizeT_create_dl_transform_resize — 出力寸法を使用してリサイズ変換を作成する。

書式🔗

create_dl_transform_resize( string TransformName, integer ImageDimensions, attribute.name GenParamName, attribute.value GenParamValue, out dl_transform Resize )void CreateDlTransformResize( const HTuple& TransformName, const HTuple& ImageDimensions, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Resize )static void HOperatorSet.CreateDlTransformResize( HTuple transformName, HTuple imageDimensions, HTuple genParamName, HTuple genParamValue, out HTuple resize )def create_dl_transform_resize( transform_name: str, image_dimensions: Sequence[int], gen_param_name: Sequence[str], gen_param_value: Sequence[Union[str, float, int]] ) -> HHandle

Herror T_create_dl_transform_resize( const Htuple TransformName, const Htuple ImageDimensions, const Htuple GenParamName, const Htuple GenParamValue, Htuple* Resize )

void HDlTransform::HDlTransform( const HString& TransformName, const HTuple& ImageDimensions, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::HDlTransform( const char* TransformName, const HTuple& ImageDimensions, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::HDlTransform( const wchar_t* TransformName, const HTuple& ImageDimensions, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)

public HDlTransform( string transformName, HTuple imageDimensions, HTuple genParamName, HTuple genParamValue )

void HDlTransform::CreateDlTransformResize( const HString& TransformName, const HTuple& ImageDimensions, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::CreateDlTransformResize( const char* TransformName, const HTuple& ImageDimensions, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::CreateDlTransformResize( const wchar_t* TransformName, const HTuple& ImageDimensions, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)

void HDlTransform.CreateDlTransformResize( string transformName, HTuple imageDimensions, HTuple genParamName, HTuple genParamValue )

説明🔗

オペレーター create_dl_transform_resizeCreateDlTransformResize は、出力寸法を指定したリサイズ変換を作成し、 その変換ハンドルを Resizeresizeresize に返します。この変換は、必要に応じて入力画像を指定された 寸法にリサイズします。

パラメーター TransformNametransformNametransform_name は、変換のための一意かつ空ではない名前を指定します。 create_dl_transform_pipelineCreateDlTransformPipeline を使用して変換パイプラインを作成する場合、パイプライン内の 各変換は一意の名前を持つ必要があることに注意してください。

パラメーター ImageDimensionsimageDimensionsimage_dimensions は、リサイズ変換 Resizeresizeresize の絶対的な出力寸法を定義します。 これには、出力画像の寸法 'width'、'height'、および 'num_channels' が 配列として含まれます。 -1-1 を渡すと、入力画像の対応する寸法が変更されずに保持されます。 すべての画像寸法を同時に -1-1 に設定することは許可されていません。 入力チャンネル数は、目的のチャンネル数と等しいかどうかがチェックされます。チャンネル数は、 33(11 チャンネルを含む入力の場合)または 11(33 チャンネルを含む入力の場合)に のみ適合させることができます。 それ以外のすべてのケースでは、エラーが発生します。

以下の汎用パラメーター GenParamNamegenParamNamegen_param_name と、対応する値 GenParamValuegenParamValuegen_param_value がサポートされています。

  • 'alignment'"alignment": 'zoom_type'"zoom_type"='fit'"fit" が使用される際のアライメントモードを指定します。 現在、アライメントは 'center'"center" と 'top_left'"top_left" が サポートされています。

    初期値: 'center'"center".

  • 'interpolation'"interpolation": 補間モードを指定します。 現在、モード 'constant'"constant" と 'nearest_neighbor'"nearest_neighbor" が サポートされています。

    初期値: 'constant'"constant".

  • 'zoom_type'"zoom_type": リサイズ中に適用されるズームモードを指定します。 指定可能な値は以下の通りです:

    • 'fill'"fill": 画像を指定された width と height にリサイズします。 アスペクト比が変わる可能性があります。パディングは適用されません。

    • 'fit'"fit": 指定された width または height に収まるように画像をリサイズします。 アスペクト比は維持されます。必要に応じてパディングが適用されます。 'fill_value'"fill_value" は set_dl_transform_pipeline_paramSetDlTransformPipelineParam を使用して指定できます。

    初期値: 'fill'"fill".

以下のパラメーターは、変換タイプ 'resize'"resize" に固有のものです。これらはそれぞれ、 オペレーター get_dl_transform_pipeline_paramGetDlTransformPipelineParam および set_dl_transform_pipeline_paramSetDlTransformPipelineParam を使用して取得または設定できます。

ParamName set get
'alignment'"alignment" x x
'image_dimensions'"image_dimensions" x x
'interpolation'"interpolation" x x
'zoom_type'"zoom_type" x x

実行情報🔗

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

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

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

このオペレータはハンドルを返します。このハンドルタイプのインスタンスの状態は、特定のオペレータにおいては、入力パラメータとして使われている場合であっても変更されることがあります。

パラメーター🔗

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

出力変換の名前

初期値: 'resize'"resize"

ImageDimensionsimageDimensionsimage_dimensions (input_control) integer-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

画像の寸法(幅、高さ、およびチャンネル数)

初期値: [512, 512, 3][512, 512, 3]

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

汎用入力パラメーター名

初期値: [][]
値のリスト: 'alignment', 'interpolation', 'zoom_type'"alignment", "interpolation", "zoom_type"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (string / real / integer)HTuple (HString / double / Hlong)HTuple (string / double / int / long)Sequence[Union[str, float, int]]Htuple (char* / double / Hlong)

汎用入力パラメーター値

初期値: [][]
推奨値: 'fill', 'fit', 1.0"fill", "fit", 1.0

Resizeresizeresize (output_control) dl_transform → (handle)HTuple (HHandle)HDlTransform, HTuple (IntPtr)HHandleHtuple (handle)

リサイズ変換

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

組み合わせ

後処理の候補

create_dl_transform_pipelineCreateDlTransformPipeline

関連項目

create_dl_transform_random_hsvCreateDlTransformRandomHsv, transform_dl_sample_batchTransformDlSampleBatch

モジュール🔗

Foundation