iipsrv 1.3
iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images
Transform Struct Reference

Image Processing Transforms. More...

#include <Transforms.h>

Public Member Functions

std::string getDescription () const
 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 sRGB2LAB (RawTile &in)
 Convert from sRGB to CIELAB colour space.
 
void scale_to_8bit (RawTile &in)
 Fast efficient scaling from higher fixed point bit depths to 8 bit.
 
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 (exponential transform)
 
void log (RawTile &in)
 Apply log transform: out = c log( 1 + in )
 
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.
 
void convolution (RawTile &in, const std::vector< float > &conv)
 Apply convolution.
 

Detailed Description

Image Processing Transforms.

Member Function Documentation

◆ binary()

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

Create binary (bi-level) image.

Parameters
ininput image
thresholdthreshold for binary image segmentation

References RawTile::bpc, RawTile::data, greyscale(), RawTile::height, threshold(), and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ cmap()

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

Function to apply colormap to gray images.

Parameters
intile data to be converted
cmapcolor map to apply.

References RawTile::bpc, RawTile::capacity, RawTile::channels, cmap(), RawTile::data, RawTile::dataLength, RawTile::height, and RawTile::width.

Referenced by cmap(), CVT::send(), and JTL::send().

◆ contrast()

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

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

Parameters
intile data to be adjusted
ccontrast value

References RawTile::bpc, RawTile::capacity, RawTile::channels, contrast(), RawTile::data, RawTile::dataLength, RawTile::height, RawTile::sampleType, and RawTile::width.

Referenced by contrast(), histogram(), CVT::send(), and JTL::send().

◆ convolution()

void Transform::convolution ( RawTile in,
const std::vector< float > &  conv 
)

Apply convolution.

Parameters
ininput image
convconvolution matrix

References RawTile::channels, RawTile::data, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ equalize()

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

Apply histogram equalization to an image.

Parameters
ininput image
histogramimage histogram

References RawTile::channels, RawTile::data, RawTile::height, histogram(), and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ flatten()

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

Extract bands.

Parameters
ininput image
bandsnumber of bands

References RawTile::bpc, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ flip()

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

Flip image.

Parameters
ininput image
oorientation (0=horizontal,1=vertical)

References RawTile::channels, RawTile::data, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ gamma()

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

Apply a gamma correction (exponential transform)

Parameters
intile input data
ggamma

References RawTile::channels, RawTile::data, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ greyscale()

void Transform::greyscale ( RawTile in)

Convert image to grayscale.

Parameters
ininput image

References RawTile::bpc, RawTile::capacity, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, and RawTile::width.

Referenced by binary(), CVT::send(), and JTL::send().

◆ histogram()

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

Calculate histogram of an image.

Parameters
ininput image
maxmax image values for each channel
minmin image values for each channel
Returns
vector containing histogram (single histogram for all channels)

References RawTile::bpc, RawTile::channels, contrast(), RawTile::data, RawTile::height, histogram(), normalize(), and RawTile::width.

Referenced by equalize(), histogram(), CVT::send(), JTL::send(), and threshold().

◆ interpolate_bilinear()

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

Resize image using bilinear interpolation.

Parameters
intile input data
wtarget width
htarget height

References RawTile::bpc, RawTile::capacity, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, and RawTile::width.

Referenced by CVT::send().

◆ interpolate_nearestneighbour()

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

Resize image using nearest neighbour interpolation.

Parameters
intile input data
wtarget width
htarget height

References RawTile::bpc, RawTile::capacity, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, and RawTile::width.

Referenced by CVT::send().

◆ inv()

void Transform::inv ( RawTile in)

Function to invert colormaps.

Parameters
intile data to be adjusted

References RawTile::channels, RawTile::data, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ LAB2sRGB()

void Transform::LAB2sRGB ( RawTile in)

Convert from CIELAB to sRGB colour space.

Parameters
intile data to be converted

References RawTile::bpc, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, RawTile::memoryManaged, RawTile::sampleType, and RawTile::width.

◆ log()

void Transform::log ( RawTile in)

Apply log transform: out = c log( 1 + in )

Parameters
ininput image

References RawTile::channels, RawTile::data, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ normalize()

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

Function to create normalized array.

Parameters
intile data to be adjusted
min: vector of minima
max: vector of maxima

References RawTile::bpc, RawTile::capacity, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, RawTile::sampleType, and RawTile::width.

Referenced by histogram(), CVT::send(), and JTL::send().

◆ rotate()

void Transform::rotate ( RawTile in,
float  angle = 0.0 
)

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

Parameters
intile input data
angleangle of rotation - currently only rotations by 90, 180 and 270 degrees are suported, for other values, no rotation will occur

References RawTile::channels, RawTile::data, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ scale_to_8bit()

void Transform::scale_to_8bit ( RawTile in)

Fast efficient scaling from higher fixed point bit depths to 8 bit.

Parameters
intile data to be converted

References RawTile::bpc, RawTile::capacity, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, RawTile::sampleType, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ shade()

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

Hillshading function to simulate raking light images.

Parameters
intile input data containing normal vectors at each point
h_angleangle in the horizontal plane from 12 o'clock in degrees
v_angleangle in the vertical plane in degrees. 0 is flat, 90 pointing directly down.

References RawTile::bpc, RawTile::capacity, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().

◆ sRGB2LAB()

void Transform::sRGB2LAB ( RawTile in)

Convert from sRGB to CIELAB colour space.

Parameters
intile data to be converted

References RawTile::channels, RawTile::data, RawTile::height, and RawTile::width.

◆ threshold()

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

Calculate threshold for binary (bi-level) segmentation.

Parameters
histogramimage histogram
Returns
threshold

References histogram().

Referenced by binary(), CVT::send(), and JTL::send().

◆ twist()

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

Apply a color twist.

Parameters
ininput image
ctw2D color twist matrix

References RawTile::bpc, RawTile::capacity, RawTile::channels, RawTile::data, RawTile::dataLength, RawTile::height, and RawTile::width.

Referenced by CVT::send(), and JTL::send().


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