libface 0.2
Static Public Member Functions

libface::LibFaceUtils Class Reference

List of all members.

Static Public Member Functions

static IplImage * resizeToArea (const IplImage *img, int area, double &ratio)
static CvPoint center (const Face &)
static int distance (CvPoint, CvPoint)
static int distance (const Face &, const Face &)
static CvMat * addScalar (CvMat *src, CvScalar value)
static CvMat * combine (CvMat *src, CvMat *vector)
static void divVec (CvMat *src, double value)
static CvMat * getColoumn (CvMat *src, int col)
static CvMat * mean (CvMat *src)
static CvMat * multScalar (CvMat *src, double value)
static void printMatrix (CvMat *src)
static CvMat * reshape (CvMat *src)
static CvMat * reverseOrder (CvMat *src)
static void showImage (CvArr *src, const std::string &title="Image")
static void showImage (const IplImage *img, const std::vector< Face > &faces, double scale=1, const std::string &title="Image")
static void sqrVec (CvMat *src)
static IplImage * stringToImage (const std::string &data, int depth, int channels)
static CvMat * stringToMatrix (const std::string &data, int type)
static CvMat * subtract (CvMat *src1, CvMat *src2)
static double sumVecToDouble (CvMat *src)
static CvMat * transpose (CvMat *src)
static IplImage * charToIplImage (const char *img, int width, int height, int step, int depth, int channels)
static IplImage * copyRect (const IplImage *src, const CvRect &rect)
static IplImage * scaledSection (const IplImage *src, const CvRect &sourceRect, double scaleFactor)
static IplImage * scaledSection (const IplImage *src, const CvRect &sourceRect, const CvSize &destSize)
static std::string imageToString (IplImage *src)
static std::string matrixToString (CvMat *src)

Member Function Documentation

CvMat * libface::LibFaceUtils::addScalar ( CvMat *  src,
CvScalar  value 
) [static]

A method for adding another element to the end of a vector.

Parameters:
srcA pointer to a matrix.
valueValue to be appended to the end.
Returns:
Returns a pointer to the new vector.
CvPoint libface::LibFaceUtils::center ( const Face f) [static]

Returns a CvPoint that is the center coordinate of a face object.

Parameters:
fThe face object whose center will be returned
Returns:
The center of the face
CvMat * libface::LibFaceUtils::combine ( CvMat *  src,
CvMat *  vector 
) [static]

Method for adding an extra column to a matrix. This method makes no checks on validity of the data.

Parameters:
srcA pointer to a matrix to be added to.
vectorA pointer to a vector to be added to the matrix. Needs to have the same number of rows.
Returns:
Returns a pointer to the new matrix with added column.
IplImage * libface::LibFaceUtils::copyRect ( const IplImage *  src,
const CvRect &  rect 
) [static]

cvCreateImage(cvSize(src->width, src->height), src->depth, src->nChannels);

int libface::LibFaceUtils::distance ( const Face f1,
const Face f2 
) [static]

Returns the integer-rounded distance between the centers of two faces.

Parameters:
f1The first Face object
f2The second Face object
Returns:
The distance between the two Faces
int libface::LibFaceUtils::distance ( CvPoint  p1,
CvPoint  p2 
) [static]

Returns the integer-rounded distance between two points.

Parameters:
p1The first CvPoint
p2The second CvPoint
Returns:
The distance between the two points
void libface::LibFaceUtils::divVec ( CvMat *  src,
double  value 
) [static]

Method for dividing every element by some value. Matrix is modified in process.

Parameters:
srcA pointer to a matrix.
valueA value to be divided by.
CvMat * libface::LibFaceUtils::getColoumn ( CvMat *  src,
int  col 
) [static]

Method for accessing a coloumn from a matrix.

Parameters:
srcA pointer to a matrix.
idof coloumn to be returned.
Returns:
Returns the pointer to the coloumn.
string libface::LibFaceUtils::imageToString ( IplImage *  img) [static]

Method for converting image(greyscale, 1 channel) into a string. The data in coloumns is separated by "\t" and rows are separated by "\n".

Parameters:
img- A pointer to the IplImage to be converted to string.
Returns:
String is returned containing the data of the image.
string libface::LibFaceUtils::matrixToString ( CvMat *  src) [static]

Method for converting matrix into a string. The data in coloumns is separated by "\t" and rows are separated by "\n".

Parameters:
src- A pointer to the matrix to be converted to string.
Returns:
String is returned containing the data of the matrix.
CvMat * libface::LibFaceUtils::mean ( CvMat *  src) [static]

Method for calculating mean value for every row.

Parameters:
srcA pointer to a matrix.
Returns:
Returns a pointer to the matrix containing means for every row.
CvMat * libface::LibFaceUtils::multScalar ( CvMat *  src,
double  value 
) [static]

Method for multiplying every element by a single value. New matrix is created and returned.

void libface::LibFaceUtils::printMatrix ( CvMat *  src) [static]

Method for printing matrix.

Parameters:
srcA pointer to a matrix.
CvMat * libface::LibFaceUtils::reshape ( CvMat *  src) [static]

Method for reshaping a matrix into a single coloumn vector.

Parameters:
srcA pointer to the matrix to be reshaped.
Returns:
Returns the pointer to the reshaped vector.
IplImage * libface::LibFaceUtils::resizeToArea ( const IplImage *  img,
int  area,
double &  ratio 
) [static]

This takes the input image and returns a new image of a specified pixel count (area), while preserving the aspect ratio.

Parameters:
imgThe input image
areaThe desired area of the resized image
ratioThe scaling factor, to be passed as reference
Returns:
The resized image
CvMat * libface::LibFaceUtils::reverseOrder ( CvMat *  src) [static]

Method for reversing order of the elements in a matrix. Only columns are reversed, rows are left in tact.

Parameters:
srcA pointer to a matrix to have columns reversed.
Returns:
Returns a pointer to the new matrix.
void libface::LibFaceUtils::sqrVec ( CvMat *  src) [static]

A method for squaring every element in a matrix. The matrix will be modified in the process.

Parameters:
srcA pointer to the matrix where every element will be squared.
IplImage * libface::LibFaceUtils::stringToImage ( const std::string &  data,
int  depth,
int  channels 
) [static]

Method for converting from string to image format. The data in the columns is separated by "\t" rows are separated by "\n".

Parameters:
data- String that contains the delimited data.
depth- depth for the image to be.
channels- Numbers of channels in the image.
Returns:
Returns the pointer to IplImage with the values contained in the string.
CvMat * libface::LibFaceUtils::stringToMatrix ( const std::string &  data,
int  type 
) [static]

Method for converting from string to matrix format. The data in the columns is separated by "\t" rows are separated by "\n".

Parameters:
data- String that contains the delimited data.
type- type for the matrix to be.
Returns:
Returns the pointer matrix with the values contained in the string.
CvMat * libface::LibFaceUtils::subtract ( CvMat *  src1,
CvMat *  src2 
) [static]

A method for subtrating a vector from a matrix. New matrix is created in process.

Parameters:
src1A pointer to a matrix to be subtracted from.
src2A pointer to a vector to be subtracted.
Returns:
Returns a pointer to the new matrix.
double libface::LibFaceUtils::sumVecToDouble ( CvMat *  src) [static]

Method for summing all the rows in a vector to a value of type double.

Parameters:
srcA pointer to a vector to be summed.
Returns:
Returns sum of all rows in a vector as a double.
CvMat * libface::LibFaceUtils::transpose ( CvMat *  src) [static]

Method for transposing a matrix.

Parameters:
srcA Pointer to the matrix.
Returns:
Returns a pointer to the transposed matrix.

The documentation for this class was generated from the following files:
 All Classes Files Functions