Defines | Functions | Variables

maskgen.cxx File Reference

#include <stdio.h>
#include <stdlib.h>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <unistd.h>
#include "masks_globals.h"
Include dependency graph for maskgen.cxx:

Defines

#define TABLE_LEN   256
#define N   CL_NEUTRAL
#define B   0
#define W   255

Functions

void initTable (void)
 Fills the lookup table with default values (neutral color).
int replaceTableColors (const uchar cornColors[][CORNSCNT], int maskIndex)
 Accommodate colors in lookup table to given configuration.
int generateMasks (const IplImage *src, int blur, char orientation, char teamColor, const uchar cornColors[][CORNSCNT], int masksCnt)
 Generates outputs by replacing the colors of src in a loop.
int main (int argc, char *argv[])

Variables

CvMat * transformTable
const uchar sideCornColors [SIDEMASKSCNT][CORNSCNT]
const uchar centerCornColors [CENTERMASKSCNT][CORNSCNT]

Define Documentation

#define B   0
#define N   CL_NEUTRAL
#define TABLE_LEN   256
#define W   255

Function Documentation

int generateMasks ( const IplImage *  src,
int  blur,
char  orientation,
char  teamColor,
const uchar  cornColors[][CORNSCNT],
int  masksCnt 
)

Generates outputs by replacing the colors of src in a loop.

Parameters:
src Source mask image.
blur If >0, the outputs are also smoothed using this blur width.
orientation Side configuration 's', center 'c'.
teamColor Team color - yellow 'y' or blue 'b'.
cornColors Table of all configurations with given orientation.
masksCnt Size of first dimension of the table.
Returns:
Always zero, even if output files were not saved (in this case a message is printed in the standard output).

Here is the call graph for this function:

Here is the caller graph for this function:

void initTable ( void   ) 

Fills the lookup table with default values (neutral color).

int main ( int  argc,
char *  argv[] 
)

Here is the call graph for this function:

int replaceTableColors ( const uchar  cornColors[][CORNSCNT],
int  maskIndex 
)

Accommodate colors in lookup table to given configuration.

Parameters:
cornColors Table of all configurations.
maskIndex Index of current configuration.

Here is the caller graph for this function:


Variable Documentation

const uchar centerCornColors[CENTERMASKSCNT][CORNSCNT]
Initial value:
 {
        {N,N,N,N,N,B,N,W,B,W},
        {N,N,N,N,N,B,N,B,W,W},
        {N,N,N,N,N,W,N,W,B,B},
        {N,N,N,N,N,W,N,B,W,B}
}
const uchar sideCornColors[SIDEMASKSCNT][CORNSCNT]
Initial value:
 {
        {W,W,B,W,B,N,W,N,N,N},
        {B,W,W,W,B,N,W,N,N,N},
        {W,W,W,W,B,N,B,N,N,N},
        {W,B,W,W,W,N,B,N,N,N},
        {B,B,W,W,W,N,W,N,N,N},
        {W,B,B,W,W,N,W,N,N,N},
        {W,W,B,B,W,N,W,N,N,N},
        {B,W,W,B,W,N,W,N,N,N},
        {W,W,W,B,W,N,B,N,N,N}
}