Transform Struct Reference

Image Processing Transforms. More...

`#include <Transforms.h>`

## Public Member Functions

std::string | getDescription ()
| Get description of processing engine.
void | normalize (RawTile &in, const std::vector< float > &max, const std::vector< float > &min)
| Function to create normalized array.
void | cmap (RawTile &in, enum cmap_type cmap)
| Function to apply colormap to gray images.
void | inv (RawTile &in)
| Function to invert colormaps.
void | shade (RawTile &in, int h_angle, int v_angle)
| Hillshading function to simulate raking light images.
void | LAB2sRGB (RawTile &in)
| Convert from CIELAB to sRGB colour space.
void | contrast (RawTile &in, float c)
| Function to apply a contrast adjustment and clip to 8 bit.
void | gamma (RawTile &in, float g)
| Apply a gamma correction.
void | interpolate_nearestneighbour (RawTile &in, unsigned int w, unsigned int h)
| Resize image using nearest neighbour interpolation.
void | interpolate_bilinear (RawTile &in, unsigned int w, unsigned int h)
| Resize image using bilinear interpolation.
void | rotate (RawTile &in, float angle)
| Rotate image - currently only by 90, 180 or 270 degrees, other values will do nothing.
void | greyscale (RawTile &in)
| Convert image to grayscale.
void | twist (RawTile &in, const std::vector< std::vector< float > > &ctw)
| Apply a color twist.
void | flatten (RawTile &in, int bands)
| Extract bands.
void | flip (RawTile &in, int o)
| Flip image.
std::vector< unsigned int > | histogram (RawTile &in, const std::vector< float > &max, const std::vector< float > &min)
| Calculate histogram of an image.
unsigned char | threshold (std::vector< unsigned int > &histogram)
| Calculate threshold for binary (bi-level) segmentation.
void | binary (RawTile &in, unsigned char threshold)
| Create binary (bi-level) image.
void | equalize (RawTile &in, std::vector< unsigned int > &histogram)
| Apply histogram equalization to an image.

## Detailed Description

Image Processing Transforms.

## Member Function Documentation

## binary()

void Transform::binary | ( | RawTile & | in,
|  | unsigned char | threshold )

Create binary (bi-level) image.

Parameters

  in | input image
  threshold | threshold for binary image segmentation

References threshold().

## cmap()

void Transform::cmap | ( | RawTile & | in,
|  | enum cmap_type | cmap )

Function to apply colormap to gray images.

Parameters

  in | tile data to be converted
  cmap | color map to apply.

References cmap().

Referenced by cmap().

## contrast()

void Transform::contrast | ( | RawTile & | in,
|  | float | c )

Function to apply a contrast adjustment and clip to 8 bit.

Parameters

  in | tile data to be adjusted
  c | contrast value

## equalize()

void Transform::equalize | ( | RawTile & | in,
|  | std::vector< unsigned int > & | histogram )

Apply histogram equalization to an image.

Parameters

  in | input image
  histogram | image histogram

References histogram().

## flatten()

void Transform::flatten | ( | RawTile & | in,
|  | int | bands )

Extract bands.

Parameters

  in | input image
  bands | number of bands

## flip()

void Transform::flip | ( | RawTile & | in,
|  | int | o )

Flip image.

Parameters

  in | input image
  o | orientation (0=horizontal,1=vertical)

## gamma()

void Transform::gamma | ( | RawTile & | in,
|  | float | g )

Apply a gamma correction.

Parameters

  in | tile input data
  g | gamma

## greyscale()

void Transform::greyscale | ( | RawTile & | in | ) |

Convert image to grayscale.

Parameters

  in | input image

## histogram()

std::vector< unsigned int > Transform::histogram | ( | RawTile & | in,
|  | const std::vector< float > & | max,
|  | const std::vector< float > & | min )

Calculate histogram of an image.

Parameters

  in | input image
  max | max image values for each channel
  min | min image values for each channel

Returns
  vector containing histogram (single histogram for all channels)

Referenced by equalize(), and threshold().

## interpolate_bilinear()

void Transform::interpolate_bilinear | ( | RawTile & | in,
|  | unsigned int | w,
|  | unsigned int | h )

Resize image using bilinear interpolation.

Parameters

  in | tile input data
  w | target width
  h | target height

## interpolate_nearestneighbour()

void Transform::interpolate_nearestneighbour | ( | RawTile & | in,
|  | unsigned int | w,
|  | unsigned int | h )

Resize image using nearest neighbour interpolation.

Parameters

  in | tile input data
  w | target width
  h | target height

## inv()

void Transform::inv | ( | RawTile & | in | ) |

Function to invert colormaps.

Parameters

  in | tile data to be adjusted

## LAB2sRGB()

void Transform::LAB2sRGB | ( | RawTile & | in | ) |

Convert from CIELAB to sRGB colour space.

Parameters

  in | tile data to be converted

## normalize()

void Transform::normalize | ( | RawTile & | in,
|  | const std::vector< float > & | max,
|  | const std::vector< float > & | min )

Function to create normalized array.

Parameters

  in | tile data to be adjusted
  min | : vector of minima
  max | : vector of maxima

## rotate()

void Transform::rotate | ( | RawTile & | in,
|  | float | angle )

Rotate image - currently only by 90, 180 or 270 degrees, other values will do nothing.

Parameters

  in | tile input data
  angle | angle of rotation - currently only rotations by 90, 180 and 270 degrees are suported, for other values, no rotation will occur

## shade()

void Transform::shade | ( | RawTile & | in,
|  | int | h_angle,
|  | int | v_angle )

Hillshading function to simulate raking light images.

Parameters

  in | tile input data containing normal vectors at each point
  h_angle | angle in the horizontal plane from 12 o'clock in degrees
  v_angle | angle in the vertical plane in degrees. 0 is flat, 90 pointing directly down.

## threshold()

unsigned char Transform::threshold | ( | std::vector< unsigned int > & | histogram | ) |

Calculate threshold for binary (bi-level) segmentation.

Parameters

  histogram | image histogram

Returns
  threshold

References histogram().

Referenced by binary().

## twist()

void Transform::twist | ( | RawTile & | in,
|  | const std::vector< std::vector< float > > & | ctw )

Apply a color twist.

Parameters

  in | input image
  ctw | 2D color twist matrix

The documentation for this struct was generated from the following file:

- Transforms.h