Powertek.Imaging.PtColorArray Struct Reference

Byte Array (Bitmap) functions. More...

List of all members.

Static Public Member Functions

static Byte[] ColorRGBChange (Byte[] ar, int R, int G, int B)
static void ColorRGBChange (ref Byte[] ar, int R, int G, int B)
static void Contrast (ref Byte[] ar, int value)
static Byte[] Contrast (Byte[] ar, int value)
static void Brightness (ref Byte[] ar, int value)
static Byte[] Brightness (Byte[] ar, int value)
static void GrayScale (ref Byte[] pixels, bool correctLuminance)
static Byte[] GrayScale (Byte[] pixels, bool correctLuminance)
static Byte[] Array24To8Bit (Byte[] inPixels, bool convertToGray, bool correctLuminance)
static Byte[] Array8To24Bit (Byte[] pixels)
static Byte[] CompressColors (Byte[] pixels, int compressLevel)
static Byte[] ReduceColorsExt (Byte[] pixels, int compressLevel)
static Byte[] ShrinkColors (Byte[] pixels)
static void ShrinkColorsSI (Byte[] pixels, out Byte[] ar, out int[] indices)
static void ShrinkColors (Byte[] pixels, out Byte[] ar, out int[] indices)
static Byte[] ShrinkColors (Byte[] pixels, Color[] customColors)
static void CreateOffsetMask (int size, int height, out int[] ar)
static bool IsBorderIndex (int index, int maskSize, int width, int height)
static double GaborFilter (double dx, double dy, double angle, double frequency, double sigma)
static void HighPass (ref Byte[] pixels, int level)
static void AutoTonValueCorrection (ref Byte[] pixels, double upValue, Boolean useRGBChannels)
static bool ResizeNearestNeighbor (ref Byte[] orgAr, int orgWidth, int orgHeight, out Byte[] targetAr, int newWidth, int newHeight, out int realWidth, out int realHeight, bool keepAspectRatio)
static Byte[] FastGaussGRS (Byte[] ar, int width, int height, float sigma)
static Byte[] FastGauss (Byte[] ar, int width, int height, float sigma)
static void ConvertInt32ToRGB (Int32 color, out Byte r, out Byte g, out Byte b)
static Int32 ConvertByteToInt32 (ref Byte r, ref Byte g, ref Byte b)
static Int32 ConvertByteToInt32 (Byte r, Byte g, Byte b)

Properties

static Color[] ColorPaletteCSS3 [get]
static Color[] ColorPaletteWeb216 [get]


Detailed Description


Member Function Documentation

static Byte [] Powertek.Imaging.PtColorArray.Array24To8Bit ( Byte[]  inPixels,
bool  convertToGray,
bool  correctLuminance 
) [static]

Converts an 24Bit Byte Array (bgr) to an single Channel (1 Byte) Array.

if all params are set to false, the R-Channel will be extracted

Parameters:
inPixels bgr Byte Array
convertToGray if true, bgr input will be converted to gray, otherwise r channel is used
correctLuminance if true, weighted gray conversion will be used, otherwise all channel will be mixed
Returns:

static Byte [] Powertek.Imaging.PtColorArray.Array8To24Bit ( Byte[]  pixels  )  [static]

Converts the 8Bit Input Array to an 24 Bit Output Array (bgr).

The single Byte Channel will be copied to the BGR-Channels

Parameters:
pixels 8bit bgr Byte array
Returns:
24bit bgr Byte array, 8bit input copied to all channels

static void Powertek.Imaging.PtColorArray.AutoTonValueCorrection ( ref Byte[]  pixels,
double  upValue,
Boolean  useRGBChannels 
) [static]

Tone Value Correction.

Parameters:
pixels 24bit bgr Byte array
upValue Distance offset, for default use 0.025
useRGBChannels if true, tone value is calculated for every channel, otherwise weighted gray will be used

static Byte [] Powertek.Imaging.PtColorArray.Brightness ( Byte[]  ar,
int  value 
) [static]

Brightness Change.

Parameters:
ar 24bit bgr Byte array
value Level of Change (0..255)
Returns:
24bit bgr Byte array

static void Powertek.Imaging.PtColorArray.Brightness ( ref Byte[]  ar,
int  value 
) [static]

Brightness Change.

Parameters:
ar 24bit bgr Byte array
value Level of Change (0..255)

static void Powertek.Imaging.PtColorArray.ColorRGBChange ( ref Byte[]  ar,
int  R,
int  G,
int  B 
) [static]

Adjust RGB Color Levels.

Parameters:
ar 24bit bgr Byte array (in/out)
R R Level Change (0..255)
G G Level Change (0..255)
B B Level Change (0..255)

static Byte [] Powertek.Imaging.PtColorArray.ColorRGBChange ( Byte[]  ar,
int  R,
int  G,
int  B 
) [static]

Adjust RGB Color Levels.

Parameters:
ar 24bit bgr Byte array
R R Level Change (0..255)
G G Level Change (0..255)
B B Level Change (0..255)
Returns:
24bit bgr Byte array

static Byte [] Powertek.Imaging.PtColorArray.CompressColors ( Byte[]  pixels,
int  compressLevel 
) [static]

Parameters:
pixels 
compressLevel 
Returns:

static Byte [] Powertek.Imaging.PtColorArray.Contrast ( Byte[]  ar,
int  value 
) [static]

Contrast Change.

Parameters:
ar 24bit bgr Byte array
value Level of Change (0..100)
Returns:
24bit bgr Byte array

static void Powertek.Imaging.PtColorArray.Contrast ( ref Byte[]  ar,
int  value 
) [static]

Contrast Change.

Parameters:
ar 24bit bgr Byte array (in/out)
value Level of Change (0..100)

static Int32 Powertek.Imaging.PtColorArray.ConvertByteToInt32 ( Byte  r,
Byte  g,
Byte  b 
) [static]

Convert RGB Bytes to Int32 (DWORD).

Parameters:
r R Channel Value
g G Channel Value
b B Channel Value
Returns:
DWORD ColorRef

static Int32 Powertek.Imaging.PtColorArray.ConvertByteToInt32 ( ref Byte  r,
ref Byte  g,
ref Byte  b 
) [static]

Convert RGB Bytes to Int32 (DWORD).

Parameters:
r R Channel Value
g G Channel Value
b B Channel Value
Returns:
DWORD ColorRef

static void Powertek.Imaging.PtColorArray.ConvertInt32ToRGB ( Int32  color,
out Byte  r,
out Byte  g,
out Byte  b 
) [static]

Convert Int32 (DWORD) to RGB Bytes.

Parameters:
color DWORD ColorRef
r R Channel Value
g G Channel Value
b B Channel Value

static void Powertek.Imaging.PtColorArray.CreateOffsetMask ( int  size,
int  height,
out int[]  ar 
) [static]

Creates the offset indices (every 3 x Bytes) needed for referencing the neighbors of an pixel.

Parameters:
size kernelsize
height width of the image in the array
ar index array

static Byte [] Powertek.Imaging.PtColorArray.FastGauss ( Byte[]  ar,
int  width,
int  height,
float  sigma 
) [static]

Fast Separable Gassian Blur for Byte Array.

Parameters:
ar 24bit bgr Byte Array
width Org Width of the Array (Image)
height Org Height of the Array (Image)
sigma Sigma of the Gassian Blur (0..100)
Returns:
24bit bgr Byte Array

static Byte [] Powertek.Imaging.PtColorArray.FastGaussGRS ( Byte[]  ar,
int  width,
int  height,
float  sigma 
) [static]

Fast Separable Gassian Blur for Byte Array.

Parameters:
ar 8bit (Grayscale) Byte Array
width Org Width of the Array (Image)
height Org Height of the Array (Image)
sigma Sigma of the Gassian Blur (0..100)
Returns:
24bit bgr Byte Array

static double Powertek.Imaging.PtColorArray.GaborFilter ( double  dx,
double  dy,
double  angle,
double  frequency,
double  sigma 
) [static]

Gabor Filter.

Parameters:
dx horizontal distance between the focal point and center of the filter
dy vertical distance between the focal point and center of the filter
angle angle of the Gabor filter
frequency frequency of the Gabor filter
sigma the variance of the normal distribution, or: the effective distance (i.e. size) of the filter
Returns:

static Byte [] Powertek.Imaging.PtColorArray.GrayScale ( Byte[]  pixels,
bool  correctLuminance 
) [static]

GrayScale Conversion.

Parameters:
pixels 24bit bgr Byte Array
correctLuminance if true, weighted conversion is used, otherwise the channel will be mixed
Returns:
24bit bgr Byte Array

static void Powertek.Imaging.PtColorArray.GrayScale ( ref Byte[]  pixels,
bool  correctLuminance 
) [static]

GrayScale Conversion.

Parameters:
pixels 24bit bgr Byte Array (in/out)
correctLuminance if true, weighted conversion is used, otherwise the channel will be mixed

static void Powertek.Imaging.PtColorArray.HighPass ( ref Byte[]  pixels,
int  level 
) [static]

Highpassfilter.

Parameters:
pixels 24bit bgr Byte array
level Level (0..255)

static bool Powertek.Imaging.PtColorArray.IsBorderIndex ( int  index,
int  maskSize,
int  width,
int  height 
) [static]

Checks if an index lies on the border of the mask.

Parameters:
index 
maskSize 
width 
height 
Returns:

static Byte [] Powertek.Imaging.PtColorArray.ReduceColorsExt ( Byte[]  pixels,
int  compressLevel 
) [static]

Color Reduction of the input array.

Parameters:
pixels 
compressLevel range of steps compressed to one colorstep, step of 10 means 255 / 10 cols per channel
Returns:

static bool Powertek.Imaging.PtColorArray.ResizeNearestNeighbor ( ref Byte[]  orgAr,
int  orgWidth,
int  orgHeight,
out Byte[]  targetAr,
int  newWidth,
int  newHeight,
out int  realWidth,
out int  realHeight,
bool  keepAspectRatio 
) [static]

Resize Byte Array with NearestNeighbor.

Parameters:
orgAr 24bit bgr Byte array
orgWidth Width of the Input Array (Image)
orgHeight Height of the Input Array (Image)
targetAr 24bit bgr Byte array
newWidth Width of the Output Array (Image)
newHeight Height of the Output Array (Image)
realWidth The Resulting Real Width of the Array (may be different if using Aspect Ratio)
realHeight The Resulting Real Height of the Array (may be different if using Aspect Ratio)
keepAspectRatio if true, the array will be resized with with Aspect ratio of the org Array
Returns:

static Byte [] Powertek.Imaging.PtColorArray.ShrinkColors ( Byte[]  pixels,
Color[]  customColors 
) [static]

Shrink Colors to a custom color palette.

shrink to css3 colors

        Byte[] pixels = ShrinkColors(p2, PtColorArray.GetColorPaletteCSS3());

Parameters:
pixels 24bit bgr array
customColors Color array to shrink to
Returns:
24bit bgr array

static void Powertek.Imaging.PtColorArray.ShrinkColors ( Byte[]  pixels,
out Byte[]  ar,
out int[]  indices 
) [static]

Shrink Array to Different Colors, Multi Index.

build up the org array by the indices

        for (int z = 0; z  pixels.Length; z++)
        { 
          pixels[z] = ar[indices[z]];
        }

Parameters:
pixels 24 bit bgr byte array
ar 24 bit bgr byte array, used colors
indices int indices with equal length of the input array

static Byte [] Powertek.Imaging.PtColorArray.ShrinkColors ( Byte[]  pixels  )  [static]

shrink all colors of the input array, return all colors used in the input array

Parameters:
pixels 24 bit bgr byte array
Returns:
24 bit bgr byte array, used colors

static void Powertek.Imaging.PtColorArray.ShrinkColorsSI ( Byte[]  pixels,
out Byte[]  ar,
out int[]  indices 
) [static]

Shrink Array to Different Colors, Single Index.

build up the org array by the indices

        for (int z = 0; z  pixels.Length; z+=3)
        { 
          pixels[z] = ar[3 * indices[z/3]];
          pixels[z + 1] = ar[3 * indices[z/3] + 1];
          pixels[z + 2] = ar[3 * indices[z/3] + 2];
        }

Parameters:
pixels 24 bit bgr byte array
ar 24 bit bgr byte array, used colors
indices int indices 1/3 length of input array (index to the startByte, use 3 * index, 3 * index + 1, 3 * index + 2 to get the color


Property Documentation

Color [] Powertek.Imaging.PtColorArray.ColorPaletteCSS3 [static, get]

Returns CCS3 Colors (140), equal to Std .NET Colors.

Color [] Powertek.Imaging.PtColorArray.ColorPaletteWeb216 [static, get]

Returns all Web Colors (216).


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

Generated on Thu Nov 20 04:48:15 2008 for Powertek.Imaging, 2.0.2.46 by  doxygen 1.5.7.1