Polarization#

namespace Itala

Enums

enum PolarComponent#

Components of the polarizer filter which represent a specific angle of polarization of the incoming light.

Values:

enumerator P0#
enumerator P45#
enumerator P90#
enumerator P135#
enum PolarDemosaicingAlgorithm#

Demosaicing algorithm applied to the image. None, NearestNeighbour and Bilinear algorithms give a resulting image with the same pixel format of the original. WeightedBilinear returns 32-bit floating point data. The width and height of the resulting image also depend on the used algorithm. In particular:

  • None -> w/2, h/2

  • NearestNeighbour -> w - 2, h - 2

  • Bilinear -> w - 3, h - 3

  • WeightedBilinear -> w - 4, h - 4

Values:

enumerator None#
enumerator NearestNeighbour#
enumerator Bilinear#
enumerator WeightedBilinear#

Functions

IImage *ExtractPolarComponent(const IImage *image, PolarComponent component, PolarDemosaicingAlgorithm algorithm)#

Extract a specific component (or angle) of the polarizer filter. The resulting image represents the captured light at the angle specified in degrees.

Note

Only monochrome images are supported.

Parameters:
  • image – Raw image, acquired using a monochrome polarization filter array.

  • component – Component of the polarizer sensor.

  • algorithm – Demosaicing algorithm to be applied to the image.

Returns:

Pointer to the image containing the requested polar component.

PolarComponents ExtractAllPolarComponents(const IImage *image, PolarDemosaicingAlgorithm algorithm)#

Extract an image for each component (or angle) of the polarizer filter. Each resulting image represents the captured light at 0, 45, 90 and 135 degrees respectively.

Note

Only monochrome images are supported.

Parameters:
  • image – Raw image, acquired using a monochrome polarization filter array.

  • algorithm – Demosaicing algorithm to be applied to the image.

Returns:

Structure containing the pointers to the polar component images.

PolarComponentsColor ExtractAllPolarComponentsColor(const IImage *image, PolarDemosaicingAlgorithm algorithm)#

For each color channel, extract an image for each component (or angle) of the polarizer filter. Each resulting image represents the captured light at 0, 45, 90 and 135 degrees respectively, for each color channel.

Note

Only bayer color images are supported.

Parameters:
  • image – Raw image, acquired using a color polarization filter array.

  • algorithm – Demosaicing algorithm to be applied to the image.

Returns:

Structure containing the pointers to the polar component images, for each color channel.

IImage *ComputeStokesS0(const PolarComponents &polarComponents)#

Computes only the S0 component of the Stokes vectors from the extracted polar components.

Parameters:

polarComponents – Polarization components demosaiced from the raw image.

Returns:

Pointer to the image containing the requested stokes vectors.

IImage *ComputeStokesS1(const PolarComponents &polarComponents)#

Computes only the S1 component of the Stokes vectors from the extracted polar components.

Parameters:

polarComponents – Polarization components demosaiced from the raw image.

Returns:

Pointer to the image containing the requested stokes vectors.

IImage *ComputeStokesS2(const PolarComponents &polarComponents)#

Computes only the S2 component of the Stokes vectors from the extracted polar components.

Parameters:

polarComponents – Polarization components demosaiced from the raw image.

Returns:

Pointer to the image containing the requested stokes vectors.

StokesVectors ComputeAllStokes(const PolarComponents &polarComponents)#

Compute all the Stokes vectors to determine the polarization state of the light given the extracted components. The Stokes vector components are expressed as 32-bit or 64-bit floating point numbers depending on the raw image format.

Parameters:

polarComponents – Polarization components demosaiced from the raw image.

Returns:

Structure containing the pointers to the stokes vector images.

IImage *ComputeAoLP(const StokesVectors &stokesVectors)#

Compute the AoLP (Angle of Linear Polarization) image from the Stokes vectors.

Parameters:

stokesVectors – Stokes vectors computed from the polarization components.

Returns:

Pointer to the AoLP image.

IImage *ComputeDoLP(const StokesVectors &stokesVectors)#

Compute the DoLP (Degree of Linear Polarization) image from the Stokes vectors.

Parameters:

stokesVectors – Stokes vectors computed from the polarization components.

Returns:

Pointer to the DoLP image.

IImage *ComputeIntensity(const StokesVectors &stokesVectors, PfncFormat rawImagePixelFormat)#

Compute the intensity image from the Stokes vectors.

Parameters:
  • stokesVectors – Stokes vectors computed from the polarization components.

  • rawImagePixelFormat – The format of the raw polarization image.

Returns:

Pointer to intensity image.

IImage *ComputeAoLP(const IImage *image, PolarDemosaicingAlgorithm algorithm)#

Convenience function which computes the AoLP (Angle of Linear Polarization) image directly from the raw polarization image without manual intermediate steps.

Note

Only monochrome images are supported.

Parameters:
  • image – Raw polarization image.

  • algorithm – Demosaicing algorithm to be applied to the image.

Returns:

Pointer to AoLP image.

IImage *ComputeDoLP(const IImage *image, PolarDemosaicingAlgorithm algorithm)#

Convenience function which computes the DoLP (Degree of Linear Polarization) image directly from the raw polarization image without manual intermediate steps.

Note

Only monochrome images are supported.

Parameters:
  • image – Raw polarization image.

  • algorithm – Demosaicing algorithm to be applied to the image.

Returns:

Pointer to DoLP image.

IImage *ComputeIntensity(const IImage *image, PolarDemosaicingAlgorithm algorithm)#

Convenience function which computes the intensity image directly from the raw polarization image without manual intermediate steps.

Note

Only monochrome images are supported.

Parameters:
  • image – Raw polarization image.

  • algorithm – Demosaicing algorithm to be applied to the image.

Returns:

Pointer to intensity image.

IImage *ComputePolarQuadrantsImage(const IImage *image)#

Computes an image split in quadrants containing the four extracted polarization components (angles), of the same width and height of the raw polarization image.

Note

Only monochrome images are supported.

Parameters:

image – Raw polarization image.

Returns:

Pointer to quadrants image.

struct PolarComponents#
#include <Polarization.h>

Convenient POD structure used as container for ExtractAllPolarComponents ‘s multi-result.

Public Members

IImage *P0#
IImage *P45#
IImage *P90#
IImage *P135#
struct PolarComponentsColor#
#include <Polarization.h>

Convenient POD structure used as container for ExtractAllPolarComponentsColor ‘s multi-result.

Public Members

PolarComponents RedComponents#
PolarComponents GreenComponents#
PolarComponents BlueComponents#
struct StokesVectors#
#include <Polarization.h>

Convenient POD structure used as container for ComputeAllStokes ‘s multi-result.

Public Members

IImage *S0#
IImage *S1#
IImage *S2#