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.) |
Further information
The F_VN_AngleAndDegreeOfLinearPolarization function calculates the angle of linear polarization (AoLP) and the degree of linear polarization (DoLP) from the four polarization angle images. These four images are the result of the F_VN_DemosaicPolarizedImage function.
The AoLP describes the orientation of the polarization plane, while the DoLP indicates the degree to which the light at a pixel is polarized. Both quantities are suitable, for example, for visualizing material properties, surface orientations, or stresses that are not discernible in a conventional intensity image.
Parameter
Input images of the polarization angles
The four input images ip0Deg, ip45Deg, ip90Deg, and ip135Deg represent the separated polarization angles (0°, 45°, 90°, and 135°). Each image must be of the type USINT (8 bits) or UINT (16 bits) and have 1 or 3 channels.
Result Images (AoLP and DoLP)
The angle of linear polarization (AoLP) is returned in image ipAoLP, and the degree of linear polarization (DoLP) is returned in image ipDoLP. Both parameters can be set to 0 if the corresponding output is not needed.
Output element type
The parameter eDestType, of type ETcVnElementType, specifies the element type of the output images:
TCVN_ET_REAL: The AoLP is issued in the range of[−π/2, π/2]and the DoLP in the range of[0, 1].TCVN_ET_USINT: Both values are scaled to the range[0, 255].
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 |