Foundation (CVPolarization.dll) 15.0
Methods

Functions

cvbres_t CVPolCalculateMinReflectionImage (IMG PolarizationImage, IMG &OutImage)
 Calculates and outputs an one plane minimum reflection image from a four plane image. More...
 
cvbres_t CVPolCalculateStokes0 (IMG PolarizationImage, IMG &OutImage)
 Calculates Stokes parameter 0 from a 4 plane polariziation image. More...
 
cvbres_t CVPolCalculateStokes1 (IMG PolarizationImage, IMG &OutImage)
 Calculates Stokes parameter 1 from a 4 plane polariziation image. More...
 
cvbres_t CVPolCalculateStokes2 (IMG PolarizationImage, IMG &OutImage)
 Calculates Stokes parameter 2 from a 4 plane polariziation image. More...
 
cvbres_t CVPolCalculateStokesImage (IMG PolarizationImage, IMG &OutImage)
 For a four plane image a new three plane image is returned in OutImage with the Stokes parameters 0 to 2 as planes. More...
 
cvbres_t CVPolColorizePolarization (IMG StokesImage, CVPOL_PSEUDO_COLOR_MODE ColorMode, IMG &OutImage)
 Generate a result image that visualizes the polarization depending on the ColorMode. More...
 
cvbres_t CVPolConvertPatternImageToPlanes (IMG RawImage, cvbval_t Pattern, CVPOL_RESOLUTION Resolution, IMG &OutImage)
 Creates a more plane image from an interleaved polarization image (de-mosaicing). More...
 

Detailed Description

Function Documentation

◆ CVPolCalculateMinReflectionImage()

cvbres_t CVPolCalculateMinReflectionImage ( IMG  PolarizationImage,
IMG &  OutImage 
)

Calculates and outputs an one plane minimum reflection image from a four plane image.

Precondition
datatypes of all PolarizationImage planes are the same.
PolarizationImage contains four planes, each representing a polarization angle.
Parameters
[in]PolarizationImageA four plane image where each plane represents one polarization angle. Usually created by CVPolConvertPatternImageToPlanes
[out]OutImageAn one plane image containing the minimum value of all polarization planes.
Returns
CVC_ERROR(CVC_ERROR_CODES::CVC_E_OK) if everything worked, else an error code.

◆ CVPolCalculateStokes0()

cvbres_t CVPolCalculateStokes0 ( IMG  PolarizationImage,
IMG &  OutImage 
)

Calculates Stokes parameter 0 from a 4 plane polariziation image.

Precondition
datatypes of all PolarizationImage planes are the same.
PolarizationImage contains four planes, each representing a polarization angle.
Parameters
[in]PolarizationImageA four plane image where each plane represents one polarization angle. Usually created by CVPolConvertPatternImageToPlanes.
[out]OutImageA one plane image with the result of the Stokes 0 parameter.
Returns
CVC_ERROR(CVC_ERROR_CODES::CVC_E_OK) if everything worked, else an error code.

◆ CVPolCalculateStokes1()

cvbres_t CVPolCalculateStokes1 ( IMG  PolarizationImage,
IMG &  OutImage 
)

Calculates Stokes parameter 1 from a 4 plane polariziation image.

Precondition
datatypes of all PolarizationImage planes are the same.
PolarizationImage contains four planes, each representing a polarization angle.
Parameters
[in]PolarizationImageA four plane image where each plane represents one polarization angle. Usually created by CVPolConvertPatternImageToPlanes.
[out]OutImageA one plane image with the result of the Stokes 1 parameter.
Returns
CVC_ERROR(CVC_ERROR_CODES::CVC_E_OK) if everything worked, else an error code.

◆ CVPolCalculateStokes2()

cvbres_t CVPolCalculateStokes2 ( IMG  PolarizationImage,
IMG &  OutImage 
)

Calculates Stokes parameter 2 from a 4 plane polariziation image.

Precondition
datatypes of all PolarizationImage planes are the same.
PolarizationImage contains four planes, each representing a polarization angle.
Parameters
[in]PolarizationImageA four plane image where each plane represents one polarization angle. Usually created by CVPolConvertPatternImageToPlanes.
[out]OutImageA one plane image with the result of the Stokes 2 parameter.
Returns
CVC_ERROR(CVC_ERROR_CODES::CVC_E_OK) if everything worked, else an error code.

◆ CVPolCalculateStokesImage()

cvbres_t CVPolCalculateStokesImage ( IMG  PolarizationImage,
IMG &  OutImage 
)

For a four plane image a new three plane image is returned in OutImage with the Stokes parameters 0 to 2 as planes.

Precondition
datatypes of all PolarizationImage planes are the same.
PolarizationImage contains four planes, each representing a polarization angle.
Parameters
[in]PolarizationImageA four plane image where each plane represents one polarization angle in rising order. Usually created by CVPolConvertPatternImageToPlanes
[out]OutImageA three plane image, where each plane represents the corresponding Stokes parameter result.
Returns
CVC_ERROR(CVC_ERROR_CODES::CVC_E_OK) if everything worked, else an error code.

◆ CVPolColorizePolarization()

cvbres_t CVPolColorizePolarization ( IMG  StokesImage,
CVPOL_PSEUDO_COLOR_MODE  ColorMode,
IMG &  OutImage 
)

Generate a result image that visualizes the polarization depending on the ColorMode.

Precondition
datatypes of all StokesImage planes are the same.
StokesImage contains three planes, representing the Stokes 0, 1 and 2 in this order.
Parameters
[in]StokesImageA image containing the three Stokes parameters as planes. Usually created by CVPolCalculateStokesImage.
[in]ColorModeA value from CVPOL_PSEUDO_COLOR_MODE.
[out]OutImageDepending on the ColorMode this will be the handle to a mono (if ColorMode is CVPOL_PCM_DEGREE_POL or CVPOL_PCM_ANGLE_POL_MONO) or else a RGB image.
Returns
CVC_ERROR(CVC_ERROR_CODES::CVC_E_OK) if everything worked, else an error code.

◆ CVPolConvertPatternImageToPlanes()

cvbres_t CVPolConvertPatternImageToPlanes ( IMG  RawImage,
cvbval_t  Pattern,
CVPOL_RESOLUTION  Resolution,
IMG &  OutImage 
)

Creates a more plane image from an interleaved polarization image (de-mosaicing).

Note
If Pattern is CVPOL_PATTERN_90_45_135_0, then a single plane image with a 2x2 pattern (top-left: 90°, top-right: 45°, bottom-left: 135°, bottom-right: 0°) is expected, if CVPOL_PATTERN_LINE_0_90_135, a three plane image with the three polarization angles 0°, 90° and 135° is expected. In both cases a four plane image will be returned in OutImage with the polarization angles as planes, which are sorted by increasing polarization angle: 0°, 45°, 90°, 135°.
If in Pattern one of the color flags is set (CVPOL_PATTERN_BAYER_GREEN_BLUE and co), the input will also be de-bayered and therefore the output will be a 12 plane image representing 4 color images. The first three planes represent the three rgb planes of 0°, the next three of 45° polarization and so forth. For further processing it might be neccessary to create four-planar sub images for each color. These should contain the four polarization angles as planes in rising order. You can do so by using CreateImageSubList from CVCImg.dll.

The usage is as follows:

// Mono polarization camera input with 2x2 pattern
IMG hOutput4PlaneImg = nullptr;
{
// error handling
}
// do something with hOutput4PlaneImg.
// Color polarization camera input with 2x2 pattern
// The first (left) two polarization blocks in the image's top row represent
// green and blue pixels in the bayer pattern (=> CVPOL_PATTERN_BAYER_GREEN_BLUE).
IMG hOutput12PlaneImg = nullptr;
{
// error handling
}
// do something with hOutput12PlaneImg.
// extract polarization image for color channel (here: red, error-handling omitted)
IMG hSinglePlaneImages[4];
IMG hRedPolarizationImage = nullptr;
CreateImageSubList(hOutput12PlaneImg, 0, 4, true, hSinglePlaneImages[0]);
CreateImageSubList(hOutput12PlaneImg, 3, 4, true, hSinglePlaneImages[1]);
CreateImageSubList(hOutput12PlaneImg, 6, 4, true, hSinglePlaneImages[2]);
CreateImageSubList(hOutput12PlaneImg, 9, 4, true, hSinglePlaneImages[3]);
CreateConcatenatedImage(hSinglePlaneImages, 4, false, hRedPolarizationImage);
@ CVPOL_PATTERN_BAYER_GREEN_BLUE
Definition: iCVPolarization.h:123
@ CVPOL_PATTERN_90_45_135_0
Definition: iCVPolarization.h:103
@ CVPOL_RES_FULL
Definition: iCVPolarization.h:84
cvbres_t CVPolConvertPatternImageToPlanes(IMG RawImage, cvbval_t Pattern, CVPOL_RESOLUTION Resolution, IMG &OutImage)
Creates a more plane image from an interleaved polarization image (de-mosaicing).
Definition: Exports.cpp:99
Parameters
[in]RawImageA raw image from a polarization camera.
[in]PatternIndicates in which pattern the polarization angles are ordered in RawImage.
[in]ResolutionIndicates whether OutImage is of the same size as RawImage or only half of the size (not upsampled).
[out]OutImageA four plane image if no color flag was set, 12 otherwise. Each plane represents one polarization angle. The size of the OutImage equals the size of the RawImage if Resolution is set to CVPOL_RES_FULL, half of the size of RawImage if Resolution was CVPOL_RES_HALF.
Returns
CVC_ERROR(CVC_ERROR_CODES::CVC_E_OK) if everything worked, else an error code.