Functions and type definitions of the CVPolarization library. More...
Public Types | |
enum | ImageResolution { Half = 0 , Full = 1 } |
Possible up sampling modes for extracted polarization planes. More... | |
enum | PseudoColorMode { Hsv1 = 0 , Hsv2 = 1 , Degree = 2 , AngleMono = 3 , AngleRgb = 4 } |
Available colorization modes to visualize polarization. More... | |
enum | Pattern { Square_90_45_135_0 = 0 , Line_0_90_135 = 1 , BayerGreenBlue = 1 << 16 , BayerBlueGreen = 1 << 17 , BayerRedGreen = 1 << 18 , BayerGreenRed = 1 << 19 } |
Possible patterns of raw polarization images. More... | |
Static Public Member Functions | |
static Image | ConvertToPlanes (Image rawImage, Pattern pattern, ImageResolution resolution) |
Extracts the four polarization angles from a raw image to a four plane image. More... | |
static Image | CalculateStokesImage (Image polarizationImage) |
From an extracted polarizationImage a new image is returned with the Stokes 0 to 2 as planes. More... | |
static Image | CalculateStokes0 (Image polarizationImage) |
From an extracted polarizationImage a new image is returned with the Stokes 0 as content. More... | |
static Image | CalculateStokes1 (Image polarizationImage) |
From an extracted polarizationImage a new image is returned with the Stokes 1 as content. More... | |
static Image | CalculateStokes2 (Image polarizationImage) |
From an extracted polarizationImage a new image is returned with the Stokes 2 as content. More... | |
static Image | CalculateMinReflectionImage (Image polarizationImage) |
From an extracted polarizationImage the minimum reflection image is calculated and returned. More... | |
static Image | Colorize (Image stokesImage, PseudoColorMode colorMode) |
An extracted stokesImage is colorized in a chosen way to visualize the polarization. More... | |
Functions and type definitions of the CVPolarization library.
enum ImageResolution |
Possible up sampling modes for extracted polarization planes.
enum Pattern |
Possible patterns of raw polarization images.
enum PseudoColorMode |
Available colorization modes to visualize polarization.
Enumerator | |
---|---|
Hsv1 | RGB image from:
|
Hsv2 | RGB image from:
|
Degree | Mono image with:
|
AngleMono | Mono image with:
|
AngleRgb | RGB image from:
|
From an extracted polarizationImage the minimum reflection image is calculated and returned.
The minimum reflection image is calculated by taking the minimum value of all the polarization angles that are contained in the input image.
polarizationImage | Input image with extracted polarization data. Usually from ConvertToPlanes. |
From an extracted polarizationImage a new image is returned with the Stokes 0 as content.
From an extracted polarization image Stokes 0 is calculated and returned in outImage. Stokes 0 is calculated as (0° + 45° + 90° + 135°) * 0.25
.
polarizationImage | Input image with extracted polarization data. Usually from ConvertToPlanes. |
From an extracted polarizationImage a new image is returned with the Stokes 1 as content.
From an extracted polarization image Stokes 1 is calculated and returned in outImage.
polarizationImage | Input image with extracted polarization data. Usually from ConvertToPlanes. |
From an extracted polarizationImage a new image is returned with the Stokes 2 as content.
From an extracted polarization image Stokes 2 is calculated and returned in outImage.
polarizationImage | Input image with extracted polarization data. Usually from ConvertToPlanes. |
From an extracted polarizationImage a new image is returned with the Stokes 0 to 2 as planes.
From a extracted polarization image the three first Stokes are calculated and returned in outImage. Stokes 0 is calculated as (0° + 45° + 90° + 135°) * 0.25
. The index of the plane represents the Stokes' number.
polarizationImage | Input image with extracted polarization data. Usually from ConvertToPlanes. |
|
static |
An extracted stokesImage is colorized in a chosen way to visualize the polarization.
Depending on the colorMode the polarization of the input image is visualized in different ways. See the comments for PseudoColorMode on information what colorization modes are available
stokesImage | Input image with calculated stokes from a polarization image Usually from CalculateStokesImage. |
colorMode | The PseudoColorMode that will be used to colorize the image. |
|
static |
Extracts the four polarization angles from a raw image to a four plane image.
From a raw polarization image this function extracts the polarization angles to outImage. The returned image holds the polarization data as 4 planes sorted by increasing angle: 0°, 45°, 90°, 135°
The expected pattern of the raw image with Pattern.Square_90_45_135_0 for example is a 2x2 pattern with: Top-left: 90°, Top-right: 45°, Bottom-left: 135°, Bottom-right: 0°.
If resolution is set to CVPOL_RESOLUTION_FULL the image is interpolated and has the same size as rawImage, otherwise it will be half the size.
rawImage | Input image with raw polarization data. |
pattern | Indicates in which pattern the polarization angles are ordered in rawImage. |
resolution | Resolution of outImage. If set to CVPOL_RESOLUTION_FULL the image is interpolated and will equal the size of rawImage, otherwise it will be half the size. |