kn Namespace Reference


Classes

class  ConvolutionAverageOperator
 convolution operator for average More...
class  ConvolutionExtremaSuppressorOperator
 convolution operator for ExtremaSuppressor More...
class  ConvolutionKernel
 Kernel used for convolution filter. More...
class  ConvolutionMaxOperator
 convolution operator for Max More...
class  ConvolutionMinOperator
 convolution operator for Min More...
class  ConvolutionOperator
 Interface for convolution operator. More...
class  Image
 Container for images This class represent any generic image for any size, and basic type and any nb channel. More...
class  Image3D
 Container for images 3D This class represent any generic image 3D for any size, and basic type and any nb of channels. More...
class  ImageConvolution
 Generic image convolution. More...
class  ImageException
 Exception thrown in case of image error. More...
class  ImageGS
 Class for Grey Scale image. More...
class  ImageProcessing
 Interface for images processing. More...
class  ImageRGB
 Class for RGB image. More...
struct  rgbe_header_info
struct  str_TGA_Header_loader

Typedefs

typedef ImageConvolution< float > ImageConvolutionf
typedef ImageConvolution< double > ImageConvolutiond
typedef ImageConvolution
< unsigned char > 
ImageConvolution8u
typedef ImageConvolution
< unsigned short int > 
ImageConvolution16u
typedef ImageConvolution
< unsigned int > 
ImageConvolution32u
typedef ImageConvolution
< unsigned long int > 
ImageConvolution64u
typedef ImageConvolution< char > ImageConvolution8s
typedef ImageConvolution
< short int > 
ImageConvolution16s
typedef ImageConvolution< int > ImageConvolution32s
typedef ImageConvolution< long
int > 
ImageConvolution64s
typedef ImageGS< float > ImageGSf
typedef ImageGS< double > ImageGSd
typedef ImageGS< unsigned char > ImageGS8u
typedef ImageGS< unsigned
short int > 
ImageGS16u
typedef ImageGS< unsigned int > ImageGS32u
typedef ImageGS< unsigned long
int > 
ImageGS64u
typedef ImageGS< char > ImageGS8s
typedef ImageGS< short int > ImageGS16s
typedef ImageGS< int > ImageGS32s
typedef ImageGS< long int > ImageGS64s
typedef ImageRGB< float > ImageRGBf
typedef ImageRGB< double > ImageRGBd
typedef ImageRGB< unsigned char > ImageRGB8u
typedef ImageRGB< unsigned
short int > 
ImageRGB16u
typedef ImageRGB< unsigned int > ImageRGB32u
typedef ImageRGB< unsigned
long int > 
ImageRGB64u
typedef ImageRGB< char > ImageRGB8s
typedef ImageRGB< short int > ImageRGB16s
typedef ImageRGB< int > ImageRGB32s
typedef ImageRGB< long int > ImageRGB64s
typedef struct
kn::str_TGA_Header_loader 
TGA_Header_loader

Enumerations

enum  rgbe_error_codes { rgbe_read_error, rgbe_write_error, rgbe_format_error, rgbe_memory_error }
enum  JPG_file_type {
  NONE_JPG = 0, RGB_JPG = 1, RGBA_JPG = 2, L_JPG = 3,
  CMYK_JPG = 4
}
enum  TGA_file_type {
  NONE_TGA = 0, INDEXED_TGA = 1, COLOR_TGA = 2, GS_TGA = 3,
  INDEXED_RLE_TGA = 9, COLOR_RLE_TGA = 10, GS_RLE_TGA = 11
}

Functions

void canny (kn::ImageGS8u &inputImage, kn::ImageGS8u &outputImage, unsigned int lowerThres, unsigned int upperThres)
 Compute the Canny filtering.
void drawLine (ImageRGB8u &image, const int x1, const int y1, const int x2, const int y2, const unsigned char r, const unsigned char g, const unsigned char b)
void drawLine (ImageGS8u &image, const int x1, const int y1, const int x2, const int y2, const unsigned char greyLevel)
void drawLine (ImageRGB8u &image, const double line[3], const unsigned char r, const unsigned char g, const unsigned char b)
void drawLine (ImageGS8u &image, const double line[3], const unsigned char greyLevel)
void drawLineY (ImageRGB8u &image, const int x1, const int y1, const int x2, const int y2, const unsigned char r, const unsigned char g, const unsigned char b)
void drawLineY (ImageGS8u &image, const int x1, const int y1, const int x2, const int y2, const unsigned char greyLevel)
void drawLineX (ImageRGB8u &image, const int x1, const int y1, const int x2, const int y2, const unsigned char r, const unsigned char g, const unsigned char b)
void drawLineX (ImageGS8u &image, const int x1, const int y1, const int x2, const int y2, const unsigned char greyLevel)
void drawPixel (ImageRGB8u &image, int x0, int y0, const unsigned char r, const unsigned char g, const unsigned char b)
void drawPixel (ImageGS8u &image, int x0, int y0, const unsigned char greyLevel)
std::ostream & operator<< (std::ostream &stream, const ImageException &err)
 Operator << for ImageException.
void float2rgbe (unsigned char rgbe[4], float red, float green, float blue)
void rgbe2float (float *red, float *green, float *blue, unsigned char rgbe[4])
static ImageException rgbe_error (int rgbe_error_code, char *msg)
int RGBE_ReadHeader (FILE *fp, int *width, int *height, rgbe_header_info *info)
int RGBE_ReadPixels (FILE *fp, float *data, int numpixels)
int RGBE_ReadPixels_Raw (FILE *fp, unsigned char *data, int numpixels)
int RGBE_ReadPixels_RLE (FILE *fp, float *data, int scanline_width, int num_scanlines)
int loadHDR (Image< float > &res, const std::string &filename)
 Load function for HDR images.
int loadJPG (Image< unsigned char > &res, const std::string &filename)
 Load function for JPG image.
char skipComment (std::istream &is)
char skipSpace (std::istream &is)
int loadPPM (Image< unsigned char > &res, const std::string &filename)
 Loader function for PPM/PGM/PBM image.
bool savePPM (Image< unsigned char > &res, const std::string &filename)
 Export function for PPM/PGM/PBM image.
void readingError (std::ifstream &is, unsigned char *tab)
unsigned char * readColorTGANoCompress (std::ifstream &is, TGA_Header_loader *tgaheader, int &nb_component_per_pixel)
unsigned char * readColorTGACompress (std::ifstream &is, TGA_Header_loader *tgaheader, int &nb_component_per_pixel)
int loadTGA (Image< unsigned char > &res, const std::string &filename)
 Loader function for TGA image.

Typedef Documentation

Definition at line 217 of file ImageConvolution.hpp.

typedef ImageConvolution<unsigned short int> kn::ImageConvolution16u

Definition at line 213 of file ImageConvolution.hpp.

Definition at line 218 of file ImageConvolution.hpp.

Definition at line 214 of file ImageConvolution.hpp.

Definition at line 219 of file ImageConvolution.hpp.

typedef ImageConvolution<unsigned long int> kn::ImageConvolution64u

Definition at line 215 of file ImageConvolution.hpp.

Definition at line 216 of file ImageConvolution.hpp.

typedef ImageConvolution<unsigned char> kn::ImageConvolution8u

Definition at line 212 of file ImageConvolution.hpp.

Definition at line 211 of file ImageConvolution.hpp.

Definition at line 210 of file ImageConvolution.hpp.

typedef ImageGS<short int> kn::ImageGS16s

Definition at line 138 of file ImageGS.hpp.

typedef ImageGS<unsigned short int> kn::ImageGS16u

Definition at line 134 of file ImageGS.hpp.

typedef ImageGS<int> kn::ImageGS32s

Definition at line 139 of file ImageGS.hpp.

typedef ImageGS<unsigned int> kn::ImageGS32u

Definition at line 135 of file ImageGS.hpp.

typedef ImageGS<long int> kn::ImageGS64s

Definition at line 140 of file ImageGS.hpp.

typedef ImageGS<unsigned long int> kn::ImageGS64u

Definition at line 136 of file ImageGS.hpp.

typedef ImageGS<char> kn::ImageGS8s

Definition at line 137 of file ImageGS.hpp.

typedef ImageGS<unsigned char> kn::ImageGS8u

Definition at line 133 of file ImageGS.hpp.

typedef ImageGS<double> kn::ImageGSd

Definition at line 132 of file ImageGS.hpp.

typedef ImageGS<float> kn::ImageGSf

Definition at line 131 of file ImageGS.hpp.

typedef ImageRGB<short int> kn::ImageRGB16s

Definition at line 111 of file ImageRGB.hpp.

typedef ImageRGB<unsigned short int> kn::ImageRGB16u

Definition at line 107 of file ImageRGB.hpp.

typedef ImageRGB<int> kn::ImageRGB32s

Definition at line 112 of file ImageRGB.hpp.

typedef ImageRGB<unsigned int> kn::ImageRGB32u

Definition at line 108 of file ImageRGB.hpp.

typedef ImageRGB<long int> kn::ImageRGB64s

Definition at line 113 of file ImageRGB.hpp.

typedef ImageRGB<unsigned long int> kn::ImageRGB64u

Definition at line 109 of file ImageRGB.hpp.

typedef ImageRGB<char> kn::ImageRGB8s

Definition at line 110 of file ImageRGB.hpp.

typedef ImageRGB<unsigned char> kn::ImageRGB8u

Definition at line 106 of file ImageRGB.hpp.

typedef ImageRGB<double> kn::ImageRGBd

Definition at line 105 of file ImageRGB.hpp.

typedef ImageRGB<float> kn::ImageRGBf

Definition at line 104 of file ImageRGB.hpp.


Enumeration Type Documentation

Enumerator:
rgbe_read_error 
rgbe_write_error 
rgbe_format_error 
rgbe_memory_error 

Definition at line 74 of file ioHDR.cpp.


Function Documentation

void kn::canny ( kn::ImageGS8u inputImage,
kn::ImageGS8u outputImage,
unsigned int  lowerThres,
unsigned int  upperThres 
)

Compute the Canny filtering.

Parameters:
inputImage : a grayscale image
outputImage : a grayscale image, where will be stored the result. Same dimensions that the input are required.
lowerThres : the lower threshold for the hysteresis step
upperThres : the upper threshold for the hysteresis step

Definition at line 37 of file Canny.cpp.

void kn::drawLine ( ImageGS8u &  image,
const double  line[3],
const unsigned char  greyLevel 
)

Definition at line 100 of file DrawLine.cpp.

void kn::drawLine ( ImageRGB8u &  image,
const double  line[3],
const unsigned char  r,
const unsigned char  g,
const unsigned char  b 
)

Definition at line 74 of file DrawLine.cpp.

void kn::drawLine ( ImageGS8u &  image,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const unsigned char  greyLevel 
)

Definition at line 60 of file DrawLine.cpp.

void kn::drawLine ( ImageRGB8u &  image,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const unsigned char  r,
const unsigned char  g,
const unsigned char  b 
)

Definition at line 44 of file DrawLine.cpp.

void kn::drawLineX ( ImageGS8u &  image,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const unsigned char  greyLevel 
)

Definition at line 222 of file DrawLine.cpp.

void kn::drawLineX ( ImageRGB8u &  image,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const unsigned char  r,
const unsigned char  g,
const unsigned char  b 
)

Definition at line 189 of file DrawLine.cpp.

void kn::drawLineY ( ImageGS8u &  image,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const unsigned char  greyLevel 
)

Definition at line 158 of file DrawLine.cpp.

void kn::drawLineY ( ImageRGB8u &  image,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const unsigned char  r,
const unsigned char  g,
const unsigned char  b 
)

Definition at line 124 of file DrawLine.cpp.

void kn::drawPixel ( ImageGS8u &  image,
int  x0,
int  y0,
const unsigned char  greyLevel 
)

Definition at line 279 of file DrawLine.cpp.

void kn::drawPixel ( ImageRGB8u &  image,
int  x0,
int  y0,
const unsigned char  r,
const unsigned char  g,
const unsigned char  b 
)

Definition at line 253 of file DrawLine.cpp.

void kn::float2rgbe ( unsigned char  rgbe[4],
float  red,
float  green,
float  blue 
) [inline]

Definition at line 84 of file ioHDR.cpp.

int kn::loadHDR ( Image< float > &  res,
const std::string &  filename 
)

Load function for HDR images.

This is a generic HDR loading class. It handles .hdr format file.
File format is available through http://www.graphics.cornell.edu/~bjw/rgbe.html

Author:
Venceslas BIRI (biri@univ-mlv.fr)
Parameters:
res Image recieving data from JPG file
filename Name of the file to load

Definition at line 326 of file ioHDR.cpp.

int kn::loadJPG ( Image< unsigned char > &  res,
const std::string &  filename 
)

Load function for JPG image.

This is a generic JPG loading class. It handles jpeg format file.
This class uses the library libjpg so we do not care about format file

Parameters:
res Image recieving data from JPG file
filename Name of the file to load
Returns:
The type of the JPG file (see kn::JPG_file_type)
Todo:
Must this function check that the extension of the name file is correct ? (.jpg/.JPG/.jpeg)

Handle CMYK or YUV jpg file

Definition at line 47 of file ioJPG.cpp.

int kn::loadPPM ( Image< unsigned char > &  res,
const std::string &  filename 
)

Loader function for PPM/PGM/PBM image.

This is a generic PPM loading class. It handles P1 / P2 / P3 / P4 / P5 and P6 PPM format file.
Exact format is defined here : http://local.wasp.uwa.edu.au/~pbourke/dataformats/ppm/ but we handle only 255 different colour values (unsigned char). Boolean image (PBM) are converted to greyscale image (1 value being mapped to 0 and 0 to 255 (that is the tradition)
Beware, P4 PBM file are not supposed to exist. We handle them as Gimp does : each line is stored independently.

Parameters:
res Image receving data from file
filename Name of the file to load
Returns:
int indicating number of composant per pixel
Todo:
Must this function check that the extension of the name file is correct ? (.ppm/.PPM ...)

Definition at line 71 of file ioPPM.cpp.

int kn::loadTGA ( Image< unsigned char > &  res,
const std::string &  filename 
)

Loader function for TGA image.

This is a generic TGA loading function. It handles both compress and no compress format file.
Exact format is defined here : http://www.fileformat.info/format/tga/index.dir or more formaly here : http://tfcduke.developpez.com/tutoriel/format/tga/fichiers/tga_specs.pdf

Parameters:
res Image qui va recevoir les donnĂ©es du fichier image
filename Name of the file to load
Returns:
The type of the TGA file (see kn::TGA_file_type)
Todo:
Must this function check that the extension of the name file is correct ? (.tga/.TGA)

Color map TGA loading

Horizontal mirrored TGA loading

Translated image loading

Dealing with ARGB

Definition at line 230 of file ioTGA.cpp.

std::ostream& kn::operator<< ( std::ostream &  stream,
const ImageException &  err 
) [inline]

Operator << for ImageException.

Parameters:
stream output stream ImageException to print
Returns:
output stream

Definition at line 96 of file ImageException.hpp.

unsigned char* kn::readColorTGACompress ( std::ifstream &  is,
TGA_Header_loader *  tgaheader,
int &  nb_component_per_pixel 
)

Definition at line 133 of file ioTGA.cpp.

unsigned char* kn::readColorTGANoCompress ( std::ifstream &  is,
TGA_Header_loader *  tgaheader,
int &  nb_component_per_pixel 
)

Definition at line 68 of file ioTGA.cpp.

void kn::readingError ( std::ifstream &  is,
unsigned char *  tab 
)

Definition at line 60 of file ioTGA.cpp.

void kn::rgbe2float ( float *  red,
float *  green,
float *  blue,
unsigned char  rgbe[4] 
) [inline]

Definition at line 107 of file ioHDR.cpp.

static ImageException kn::rgbe_error ( int  rgbe_error_code,
char *  msg 
) [static]

Definition at line 123 of file ioHDR.cpp.

int kn::RGBE_ReadHeader ( FILE *  fp,
int *  width,
int *  height,
rgbe_header_info *  info 
)

Definition at line 144 of file ioHDR.cpp.

int kn::RGBE_ReadPixels ( FILE *  fp,
float *  data,
int  numpixels 
)

Definition at line 212 of file ioHDR.cpp.

int kn::RGBE_ReadPixels_Raw ( FILE *  fp,
unsigned char *  data,
int  numpixels 
)

Definition at line 228 of file ioHDR.cpp.

int kn::RGBE_ReadPixels_RLE ( FILE *  fp,
float *  data,
int  scanline_width,
int  num_scanlines 
)

Definition at line 236 of file ioHDR.cpp.

bool kn::savePPM ( Image< unsigned char > &  res,
const std::string &  filename 
)

Export function for PPM/PGM/PBM image.

This is a generic PPM exporting class. It handles P1 / P2 / P3 / P4 / P5 and P6 PPM format file.

Exact format is defined here : http://local.wasp.uwa.edu.au/~pbourke/dataformats/ppm/ We only export PPM and PGM files with raw data format so P5 and P6 file format

Parameters:
res Image that contents
filename Name of the file to export
Returns:
Boolean indicating succes of export operation

Definition at line 241 of file ioPPM.cpp.

char kn::skipComment ( std::istream &  is  ) 

Definition at line 42 of file ioPPM.cpp.

char kn::skipSpace ( std::istream &  is  ) 

Definition at line 57 of file ioPPM.cpp.


Generated on Thu Nov 12 16:06:36 2009 for OpenKraken-image by  doxygen 1.5.8