#include <stdlib.h>
#include <math.h>
#include <memory.h>
#include <float.h>
#include "segmentation.h"
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) |
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) |
Variables | |
tpCrominanceThreshold * | bgCrominanceThresholdMap |
tpThreshold * | bgThresholdMap |
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 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)) |
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 | |||
) |
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] |