Operator Reference

create_dl_layer_zoom_sizeT_create_dl_layer_zoom_sizeCreateDlLayerZoomSizeCreateDlLayerZoomSizecreate_dl_layer_zoom_size (Operator)

create_dl_layer_zoom_sizeT_create_dl_layer_zoom_sizeCreateDlLayerZoomSizeCreateDlLayerZoomSizecreate_dl_layer_zoom_size — Create a zoom layer using an absolute output size.

Signature

Herror T_create_dl_layer_zoom_size(const Htuple DLLayerInput, const Htuple LayerName, const Htuple Width, const Htuple Height, const Htuple Interpolation, const Htuple AlignCorners, const Htuple GenParamName, const Htuple GenParamValue, Htuple* DLLayerZoom)

void CreateDlLayerZoomSize(const HTuple& DLLayerInput, const HTuple& LayerName, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation, const HTuple& AlignCorners, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* DLLayerZoom)

HDlLayer HDlLayer::CreateDlLayerZoomSize(const HString& LayerName, Hlong Width, Hlong Height, const HString& Interpolation, const HString& AlignCorners, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerZoomSize(const HString& LayerName, Hlong Width, Hlong Height, const HString& Interpolation, const HString& AlignCorners, const HString& GenParamName, const HString& GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerZoomSize(const char* LayerName, Hlong Width, Hlong Height, const char* Interpolation, const char* AlignCorners, const char* GenParamName, const char* GenParamValue) const

HDlLayer HDlLayer::CreateDlLayerZoomSize(const wchar_t* LayerName, Hlong Width, Hlong Height, const wchar_t* Interpolation, const wchar_t* AlignCorners, const wchar_t* GenParamName, const wchar_t* GenParamValue) const   ( Windows only)

static void HOperatorSet.CreateDlLayerZoomSize(HTuple DLLayerInput, HTuple layerName, HTuple width, HTuple height, HTuple interpolation, HTuple alignCorners, HTuple genParamName, HTuple genParamValue, out HTuple DLLayerZoom)

HDlLayer HDlLayer.CreateDlLayerZoomSize(string layerName, int width, int height, string interpolation, string alignCorners, HTuple genParamName, HTuple genParamValue)

HDlLayer HDlLayer.CreateDlLayerZoomSize(string layerName, int width, int height, string interpolation, string alignCorners, string genParamName, string genParamValue)

def create_dl_layer_zoom_size(dllayer_input: HHandle, layer_name: str, width: int, height: int, interpolation: str, align_corners: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Description

The operator create_dl_layer_zoom_sizecreate_dl_layer_zoom_sizeCreateDlLayerZoomSizeCreateDlLayerZoomSizecreate_dl_layer_zoom_size creates a zoom layer using an absolute output size and returns the layer handle in DLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomdllayer_zoom.

The parameter DLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input determines the feeding input layer and expects the layer handle as value.

The parameter LayerNameLayerNameLayerNamelayerNamelayer_name sets an individual layer name. Note that if creating a model using create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelcreate_dl_model each layer of the created network must have a unique name.

The parameters WidthWidthWidthwidthwidth and HeightHeightHeightheightheight define the absolute output size of the zoom layer DLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomdllayer_zoom.

The parameter InterpolationInterpolationInterpolationinterpolationinterpolation defines the interpolation mode. Currently only the mode 'bilinear'"bilinear""bilinear""bilinear""bilinear" is supported.

The parameter AlignCornersAlignCornersAlignCornersalignCornersalign_corners defines how coordinates are transformed from the output to the input image:

'true'"true""true""true""true":

The transformation is applied in the HALCON Non-Standard Cartesian coordinate system (edge-centered, with the origin in the upper left corner, see chapter Transformations / 2D Transformations). Using the axis as an example, this leads to:

'false'"false""false""false""false":

The transformation is applied in the HALCON standard coordinate system (pixel centered, with the origin in the center of the upper left pixel, see chapter Transformations / 2D Transformations). Using the axis as an example, this leads to:

The following generic parameters GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and the corresponding values GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value are supported:

'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output":

Determines whether apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelapply_dl_model will include the output of this layer in the dictionary DLResultBatchDLResultBatchDLResultBatchDLResultBatchdlresult_batch even without specifying this layer in OutputsOutputsOutputsoutputsoutputs ('true'"true""true""true""true") or not ('false'"false""false""false""false").

Default: 'false'"false""false""false""false"

Certain parameters of layers created using this operator create_dl_layer_zoom_sizecreate_dl_layer_zoom_sizeCreateDlLayerZoomSizeCreateDlLayerZoomSizecreate_dl_layer_zoom_size can be set and retrieved using further operators. The following tables give an overview, which parameters can be set using set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and which ones can be retrieved using get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param or get_dl_layer_paramget_dl_layer_paramGetDlLayerParamGetDlLayerParamget_dl_layer_param. Note, the operators set_dl_model_layer_paramset_dl_model_layer_paramSetDlModelLayerParamSetDlModelLayerParamset_dl_model_layer_param and get_dl_model_layer_paramget_dl_model_layer_paramGetDlModelLayerParamGetDlModelLayerParamget_dl_model_layer_param require a model created by create_dl_modelcreate_dl_modelCreateDlModelCreateDlModelcreate_dl_model.

Layer Parameters set get
'align_corners'"align_corners""align_corners""align_corners""align_corners" (AlignCornersAlignCornersAlignCornersalignCornersalign_corners) x x
'input_layer'"input_layer""input_layer""input_layer""input_layer" (DLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input) x
'interpolation_mode'"interpolation_mode""interpolation_mode""interpolation_mode""interpolation_mode" (InterpolationInterpolationInterpolationinterpolationinterpolation) x
'name'"name""name""name""name" (LayerNameLayerNameLayerNamelayerNamelayer_name) x x
'output_layer'"output_layer""output_layer""output_layer""output_layer" (DLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomdllayer_zoom) x
'scale_params'"scale_params""scale_params""scale_params""scale_params" (WidthWidthWidthwidthwidth and HeightHeightHeightheightheight) x
'shape'"shape""shape""shape""shape" x
'type'"type""type""type""type" x
Generic Layer Parameters set get
'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output" x x
'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params" x

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

DLLayerInputDLLayerInputDLLayerInputDLLayerInputdllayer_input (input_control)  dl_layer HDlLayer, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Feeding layer.

LayerNameLayerNameLayerNamelayerNamelayer_name (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the output layer.

WidthWidthWidthwidthwidth (input_control)  number HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Absolute width of the output layer.

Default: 100

HeightHeightHeightheightheight (input_control)  number HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Absolute height of the output layer.

Default: 100

InterpolationInterpolationInterpolationinterpolationinterpolation (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Mode of interpolation.

Default: 'bilinear' "bilinear" "bilinear" "bilinear" "bilinear"

List of values: 'bilinear'"bilinear""bilinear""bilinear""bilinear"

AlignCornersAlignCornersAlignCornersalignCornersalign_corners (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of coordinate transformation between output/input images.

Default: 'false' "false" "false" "false" "false"

List of values: 'false'"false""false""false""false", 'true'"true""true""true""true"

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Generic input parameter names.

Default: []

List of values: 'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output"

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Generic input parameter values.

Default: []

Suggested values: 'true'"true""true""true""true", 'false'"false""false""false""false"

DLLayerZoomDLLayerZoomDLLayerZoomDLLayerZoomdllayer_zoom (output_control)  dl_layer HDlLayer, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Zoom layer.

Alternatives

create_dl_layer_zoom_factorcreate_dl_layer_zoom_factorCreateDlLayerZoomFactorCreateDlLayerZoomFactorcreate_dl_layer_zoom_factor, create_dl_layer_zoom_to_layer_sizecreate_dl_layer_zoom_to_layer_sizeCreateDlLayerZoomToLayerSizeCreateDlLayerZoomToLayerSizecreate_dl_layer_zoom_to_layer_size

Module

Deep Learning Professional