F_VN_RemapImage

F_VN_RemapImage 1:

Remap an image with custom maps, i.e. ipDestImage(x,y) = ipSrcImage(mapX(x,y), mapY(x,y)). Supported pairs are (ipMap1 = ET_REAL, 2 channels; ipMap2 = 0), (ipMap1 = ET_REAL, 1 channel; ipMap2 = ET_REAL, 1 channel), (ipMap1 = ET_INT, 2 channels; ipMap2 = ET_UINT, 1 channel), (ipMap1 = ET_INT, 2 channels; ipMap2 = 0).
Can use available TwinCAT Job Tasks for executing parallel code regions.

Syntax

Definition:

FUNCTION F_VN_RemapImage : HRESULT
VAR_INPUT
    ipSrcImage  : ITcVnImage;
    ipDestImage : Reference To ITcVnImage;
    ipMap1      : ITcVnImage;
    ipMap2      : ITcVnImage;
    hrPrev      : HRESULT;
END_VAR

 Inputs

Name

Type

Description

ipSrcImage

ITcVnImage

Source image

ipDestImage

Reference To ITcVnImage

Destination image (Must not be the same as ipSrcImage! Has the same size as ipMap1 and the same type as ipSrcImage. An appropriate destination image will be created if required.)

ipMap1

ITcVnImage

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))

ipMap2

ITcVnImage

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

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