C:/Documents and Settings/otavio/Desktop/src_sfi/src_sfi/segmentation.cpp File Reference

#include <stdlib.h>
#include <math.h>
#include <memory.h>
#include <float.h>
#include "segmentation.h"

Include dependency graph for segmentation.cpp:

Classes

struct  _filter

Defines

#define D_CRT   0.3
#define D_cThr   0.70
#define D_LCRT   0
#define D_LRGBT   0.3
#define D_RGBT   3.00
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))

Typedefs

typedef struct _filter tpFilter

Functions

unsigned char * __CreateSegmentationMap (unsigned char *bgImage, unsigned char *image, int width, int height, double thrs1, double thrs2)
void AddImageToModel (unsigned char *red, unsigned char *green, unsigned char *blue)
void BackgroundModelBegin (int width, int height)
void BackgroundModelEnd (float *minThresholdR, float *minThresholdG, float *minThresholdB, float *maxThresholdR, float *maxThresholdG, float *maxThresholdB, float *medThresholdR, float *medThresholdG, float *medThresholdB, tpThreshold *bgThresholdMap, tpCrominanceThreshold *bgCrominanceThresholdMap)
void CreateBGMapFromThresholdMap (unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *segmentation, tpThreshold *thresholdMap, tpCrominanceThreshold *crominanceThresholdMap, int width, int height)
tpFilterCreateFilter (int w, int h, double *kernel)
unsigned char Dilatation (unsigned char *im, int width, int height, int x, int y, tpFilter *filter, int component)
unsigned char Erosion (unsigned char *im, int width, int height, int x, int y, tpFilter *filter, int component)
double Filter (unsigned char *im, int width, int height, int x, int y, tpFilter *filt, int component)
void ImageClosing (unsigned char *image, int width, int height, int w, int h, double *strElem)
void ImageDilatation (unsigned char **image, int width, int height, int w, int h, double *strElem)
void ImageErosion (unsigned char **image, int width, int height, int w, int h, double *strElem)
void ImageOpening (unsigned char *image, int width, int height, int w, int h, double *strElem)
void KillFilter (tpFilter **filter)
void MorphologicalFiltering (unsigned char *image, int width, int height, int w, int h, double *strElem)
void SetFilterNorm (tpFilter *filter, double norm)
void SetLocalThresholds (float crominanceThreshold, float rgbThreshold)
void SetMorphologicalFilterNorm (tpFilter *filter)
void SetThresholds (float crominanceThreshold, float rgbThreshold)

Variables

tpCrominanceThresholdbgCrominanceThresholdMap
tpThresholdbgThresholdMap
static float * blueAcc
static float * blueSqAcc
static float CRT = D_CRT
static float * greenAcc
static float * greenCroAcc
static float * greenCroSqAcc
static float * greenSqAcc
static int image_height
static int image_width
static float LCRT = D_LCRT
static float LRGBT = D_LRGBT
static float maxThresholdB
static float maxThresholdG
static float maxThresholdR
static float minThresholdB
static float minThresholdG
static float minThresholdR
static int numImages
static float plusrgb
static float * redAcc
static float * redCroAcc
static float * redCroSqAcc
static float * redSqAcc
static float RGBT = D_RGBT
static float sumThresholdB
static float sumThresholdG
static float sumThresholdR

Define Documentation

#define D_CRT   0.3

#define D_cThr   0.70

#define D_LCRT   0

#define D_LRGBT   0.3

#define D_RGBT   3.00

#define MAX ( a,
 )     (((a) > (b)) ? (a) : (b))

#define MIN ( a,
 )     (((a) < (b)) ? (a) : (b))


Typedef Documentation

typedef struct _filter tpFilter


Function Documentation

unsigned char* __CreateSegmentationMap ( unsigned char *  bgImage,
unsigned char *  image,
int  width,
int  height,
double  thrs1,
double  thrs2 
)

void AddImageToModel ( unsigned char *  red,
unsigned char *  green,
unsigned char *  blue 
)

void BackgroundModelBegin ( int  width,
int  height 
)

void BackgroundModelEnd ( float *  minThresholdR,
float *  minThresholdG,
float *  minThresholdB,
float *  maxThresholdR,
float *  maxThresholdG,
float *  maxThresholdB,
float *  medThresholdR,
float *  medThresholdG,
float *  medThresholdB,
tpThreshold bgThresholdMap,
tpCrominanceThreshold bgCrominanceThresholdMap 
)

void CreateBGMapFromThresholdMap ( unsigned char *  r,
unsigned char *  g,
unsigned char *  b,
unsigned char *  segmentation,
tpThreshold thresholdMap,
tpCrominanceThreshold crominanceThresholdMap,
int  width,
int  height 
)

tpFilter* CreateFilter ( int  w,
int  h,
double *  kernel 
)

unsigned char Dilatation ( unsigned char *  im,
int  width,
int  height,
int  x,
int  y,
tpFilter filter,
int  component 
)

unsigned char Erosion ( unsigned char *  im,
int  width,
int  height,
int  x,
int  y,
tpFilter filter,
int  component 
)

double Filter ( unsigned char *  im,
int  width,
int  height,
int  x,
int  y,
tpFilter filt,
int  component 
)

void ImageClosing ( unsigned char *  image,
int  width,
int  height,
int  w,
int  h,
double *  strElem 
)

void ImageDilatation ( unsigned char **  image,
int  width,
int  height,
int  w,
int  h,
double *  strElem 
)

void ImageErosion ( unsigned char **  image,
int  width,
int  height,
int  w,
int  h,
double *  strElem 
)

void ImageOpening ( unsigned char *  image,
int  width,
int  height,
int  w,
int  h,
double *  strElem 
)

void KillFilter ( tpFilter **  filter  ) 

void MorphologicalFiltering ( unsigned char *  image,
int  width,
int  height,
int  w,
int  h,
double *  strElem 
)

void SetFilterNorm ( tpFilter filter,
double  norm 
)

void SetLocalThresholds ( float  crominanceThreshold,
float  rgbThreshold 
)

void SetMorphologicalFilterNorm ( tpFilter filter  ) 

void SetThresholds ( float  crominanceThreshold,
float  rgbThreshold 
)


Variable Documentation

tpCrominanceThreshold* bgCrominanceThresholdMap

tpThreshold* bgThresholdMap

float * blueAcc [static]

float * blueSqAcc [static]

float CRT = D_CRT [static]

float * greenAcc [static]

float * greenCroAcc [static]

float * greenCroSqAcc [static]

float * greenSqAcc [static]

int image_height [static]

int image_width [static]

float LCRT = D_LCRT [static]

float LRGBT = D_LRGBT [static]

float maxThresholdB [static]

float maxThresholdG [static]

float maxThresholdR [static]

float minThresholdB [static]

float minThresholdG [static]

float minThresholdR [static]

int numImages [static]

float plusrgb [static]

float* redAcc [static]

float* redCroAcc [static]

float * redCroSqAcc [static]

float * redSqAcc [static]

float RGBT = D_RGBT [static]

float sumThresholdB [static]

float sumThresholdG [static]

float sumThresholdR [static]


Generated on Mon Jan 14 15:36:51 2008 for Shape from Example by  doxygen 1.5.4