F_VN_AngleAndDegreeOfLinearPolarization
Computes the Angle and the Degree of Linear Polarization (AoLP, DoLP) from the four polarization angle images (result of DemosaicPolarizedImage).
Can use available TwinCAT Job Tasks for executing parallel code regions.
Syntax
Definition:
FUNCTION F_VN_AngleAndDegreeOfLinearPolarization : HRESULT
VAR_INPUT
ip0Deg : ITcVnImage;
ip45Deg : ITcVnImage;
ip90Deg : ITcVnImage;
ip135Deg : ITcVnImage;
ipAoLP : Reference To ITcVnImage;
ipDoLP : Reference To ITcVnImage;
eDestType : ETcVnElementType;
hrPrev : HRESULT;
END_VARInputs
|
Name |
Type |
Description |
|---|---|---|
|
ip0Deg |
The 0° component of the polarized image (USINT or UINT, 1 or 3 channels) | |
|
ip45Deg |
The 45° component of the polarized image (USINT or UINT, 1 or 3 channels) | |
|
ip90Deg |
The 90° component of the polarized image (USINT or UINT, 1 or 3 channels) | |
|
ip135Deg |
The 135° component of the polarized image (USINT or UINT, 1 or 3 channels) | |
|
ipAoLP |
Reference To ITcVnImage |
Returns the Angle of Linear Polarization (AoLP) image (Optional, set to 0 if not required. Must be different from the source images! An appropriate destination image will be created if required.) |
|
ipDoLP |
Reference To ITcVnImage |
Returns the Degree of Linear Polarization (DoLP) image (Optional, set to 0 if not required. Must be different from the source images! An appropriate destination image will be created if required.) |
|
eDestType |
Element type of the output images (ET_REAL or ET_USINT). For ET_REAL, AoLP is in the range of [-pi/2, pi/2] and DoLP in [0, 1]. For ET_USINT, both are scaled to a range of [0, 255]. | |
|
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Weiterführende Informationen
Die Funktion F_VN_AngleAndDegreeOfLinearPolarization berechnet den Winkel der linearen Polarisation (Angle of Linear Polarization, AoLP) sowie den Grad der linearen Polarisation (Degree of Linear Polarization, DoLP) aus den vier Polarisationswinkelbildern. Diese vier Bilder sind das Ergebnis der Funktion F_VN_DemosaicPolarizedImage.
Der AoLP beschreibt die Orientierung der Polarisationsebene, während der DoLP angibt, wie stark das Licht an einem Bildpunkt polarisiert ist. Beide Größen eignen sich z.B. um Materialeigenschaften, Oberflächenorientierungen oder Spannungen sichtbar zu machen, die im konventionellen Intensitätsbild nicht erkennbar sind.
Parameter
Eingangsbilder der Polarisationswinkel
Die vier Eingangsbilder ip0Deg, ip45Deg, ip90Deg und ip135Deg repräsentieren die separierten Polarisationswinkel (0°, 45°, 90° und 135°). Jedes Bild muss vom Typ USINT (8 Bit) oder UINT (16 Bit) sein und 1 oder 3 Kanäle besitzen.
Ergebnisbilder (AoLP und DoLP)
Über das Bild ipAoLP wird der Winkel der linearen Polarisation (AoLP) und über ipDoLP wird der Grad der linearen Polarisation (DoLP) zurückgegeben. Beide Parameter können auf 0 gesetzt werden, wenn die jeweilige Ausgabe nicht benötigt wird.
Elementtyp der Ausgabe
Der Parameter eDestType vom Typ ETcVnElementType legt den Elementtyp der Ausgangsbilder fest:
TCVN_ET_REAL: Der AoLP wird im Bereich[−π/2, π/2]und der DoLP im Bereich[0, 1]ausgegeben.TCVN_ET_USINT: Beide Größen werden auf den Wertebereich[0, 255]skaliert.
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 |