F_VN_CopyImageRegionToRegion
Copy an image region into another image region.
Syntax
Definition:
FUNCTION F_VN_CopyImageRegionToRegion : HRESULT
VAR_INPUT
ipSrcImage : ITcVnImage;
nXSrc : UDINT;
nYSrc : UDINT;
nWidth : UDINT;
nHeight : UDINT;
ipDestImage : ITcVnImage;
nXDest : UDINT;
nYDest : UDINT;
hrPrev : HRESULT;
END_VAR
Inputs
|
Name |
Type |
Description |
|---|---|---|
|
ipSrcImage |
Source image | |
|
nXSrc |
UDINT |
Left boundary in ipSrcImage (inclusive 0-based index) |
|
nYSrc |
UDINT |
Upper boundary in ipSrcImage (inclusive 0-based index) |
|
nWidth |
UDINT |
ROI width |
|
nHeight |
UDINT |
ROI height |
|
ipDestImage |
Destination image (same type as ipSrcImage) | |
|
nXDest |
UDINT |
Left boundary in ipDestImage (inclusive 0-based index) |
|
nYDest |
UDINT |
Upper boundary in ipDestImage (inclusive 0-based index) |
|
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Weiterführende Informationen
Die Funktion F_VN_CopyImageRegionToRegion kopiert einen Bildausschnitt des Eingangsbildes ipSrcImage an eine Stelle im Zielbild ipDestImage. Der Bildausschnitt wird wie bei einer ROI durch ein Rechteck mit Position und Größe angegeben.
Anwendung
Das Kopieren eines [100, 100]-großen Bildbereichs an der Position aPosition in die linke obere Ecke des Ergebnisbildes ipImageRes sieht z. B. so aus:
hr := F_VN_CopyImageRegionToRegion(
ipSrcImage := ipImageWork,
nXSrc := aPosition[0],
nYSrc := aPosition[1],
nWidth := 100,
nHeight := 100,
ipDestImage := ipImageRes,
nXDest := 0,
nYDest := 0,
hrPrev := hr
);Beispiele
Verwandte Funktionen
- F_VN_CopyImage zum Kopieren des gesamten Bildes
- F_VN_CopyImageRegion zum Kopieren eines Bildbereichs
- F_VN_CopyImageRegionToRegion zum Kopieren eines Bildbereichs an eine bestimmte Position
Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
|---|---|---|
TwinCAT V3.1.4024.59 or later | PC or CX (x64) with min. PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |
Return value