F_VN_ConvertMaps

F_VN_ConvertMaps 1:

Converts between different map types, usually from floating to fixed point to speed up RemapImage. Supported pairs are (map1 = ET_REAL, 2 channels; map2 = 0), (map1 = ET_REAL, 1 channel; map2 = ET_REAL, 1 channel), (map1 = ET_INT, 2 channels; map2 = ET_UINT, 1 channel), (map1 = ET_INT, 2 channels; map2 = 0).

Syntax

Definition:

FUNCTION F_VN_ConvertMaps : HRESULT
VAR_INPUT
    ipSrcMap1         : ITcVnImage;
    ipSrcMap2         : ITcVnImage;
    ipDestMap1        : Reference To ITcVnImage;
    ipDestMap2        : Reference To ITcVnImage;
    eDestMap1Type     : ETcVnElementType;
    nDestMap1Channels : UINT;
    hrPrev            : HRESULT;
END_VAR

 Inputs

Name

Type

Description

ipSrcMap1

ITcVnImage

Source map 1 (ET_REAL with 2 channels (containing mapX, mapY) or ET_REAL with 1 channel (containing mapX) or ET_INT with 2 channels (containing rounded mapX, mapY))

ipSrcMap2

ITcVnImage

Source map 2 (ET_REAL with 1 channel (containing mapY) or ET_UINT with 1 channel (containing interpolation table coefficients if ipSrcMap1 is ET_INT with 2 channels), otherwise set to 0 if not required.

ipDestMap1

Reference To ITcVnImage

Destination map 1 (Must not be the same as ipSrcMap1 or ipSrcMap2! An appropriate destination image will be created if required.)

ipDestMap2

Reference To ITcVnImage

Destination map 2 (Must not be the same as ipSrcMap1 or ipSrcMap2! Set to 0 if not required, i.e. if ipDestMap1 is ET_REAL with 2 channels. Otherwise an appropriate destination image will be created if required.)

eDestMap1Type

ETcVnElementType

Requested type of the resulting ipDestMap1 (ET_REAL or ET_INT). The type of ipDestMap2 is automatically determined, i.e. ET_REAL or ET_UINT or none.

nDestMap1Channels

UINT

Requested number of channels of the resulting ipDestMap1 (1 or 2, must be 2 if eDestMap1Type is ET_INT)

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

 Return value

HRESULT

Required License

TC3 Vision Base

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4026 or later

PC or CX (x64) with min. PL50, e.g. Intel 4-core Atom CPU

Tc3_Vision