Public Member Functions |
Matrix | affineWarp (const Matrix &t, const ObjectBox &b, const bool &preservear) const |
| Performs an affine warping of an image section.
|
float | avg () const |
| Returns the average value.
|
void | clip (float aMin, float aMax) |
| Clips values that exceed the given range.
|
void | copyFromCharArray (unsigned char *source) |
| fills the matrix from a char-array (size has to be already set)
|
void | copyFromFloatArray (float *source, int srcwidth, int width, int height) |
| fills the matrix from a float-array (for a given size)
|
void | copyFromFloatArray (const float *const source, int srcwidth, int srcheight, int x, int y, int width, int height) |
| fills the matrix from a sub-part of a float-array
|
float * | createSummedAreaTable () const |
| Creates an Integral Image.
|
float ** | createSummedAreaTable2 () const |
| Creates an Integral Image and an Integral Image of squared values.
|
void | cut (Matrix &result, const int x1, const int y1, const int x2, const int y2) |
| Copies a rectangular part from the matrix into result, the size of result will be adjusted.
|
float * | data () const |
| Gives access to the internal data representation.
|
void | derivativeX (Matrix &result) const |
| Computes derivative in x direction (result will be in result)
|
void | derivativeY (Matrix &result) const |
| Computes derivative in y direction (result will be in result)
|
void | downsample (int newWidth, int newHeight) |
| Downsamples the matrix.
|
void | downsampleBilinear (int newWidth, int newHeight) |
| Downsamples the matrix using bilinear interpolation.
|
void | drawBox (ObjectBox b, int value=255) |
| Draws an ObjectBox into the image.
|
void | drawCross (int x, int y, int value=255, int crossSize=1) |
| Draws a Cross.
|
void | drawDashedBox (ObjectBox b, int value=255, int dashLength=3, bool dotted=false) |
| Draws a dashed ObjectBox into the image.
|
void | drawHistogram (const float *histogram, int x, int y, int value=255, int nbins=7, int psize=15) |
| Draws a histogram at position (x,y)
|
void | drawLine (int x1, int y1, int x2, int y2, float value=255) |
| Draws a line into the image.
|
void | drawNumber (int x, int y, int n, int value=255) |
| Prints a number at position (x,y)
|
void | drawPatch (const Matrix &b, int x, int y, float avg=0) |
| Draws a NN-Patch at position (x,y)
|
void | fill (const float value) |
| Fills the matrix with the value value (see also operator =)
|
void | fromRGB (const Matrix &rMatrix, const Matrix &gMatrix, const Matrix &bMatrix) |
| Creates a grayscale matrix out of r, g, and b matrices.
|
void | fromRGB (unsigned char *source) |
| Creates a grayscale matrix out of an array [r0, r1, ..., g0, g1, ..., b0, b1, ...].
|
void | gaussianSmooth (const float sigma, const int filterSize=0) |
| Applies a Gaussian filter.
|
Matrix | getRectSubPix (float centerx, float centery, int width, int height) const |
| Returns a patch around the central point using bilinear interpolation.
|
void | halfSizeImage (Matrix &result) const |
| Downsamples image to half of its size (result will be in result)
|
void | inv3 () |
| Inverts a 3x3 matrix.
|
| Matrix () |
| Default constructor.
|
| Matrix (const int width, const int height) |
| Constructor.
|
| Matrix (const Matrix ©From) |
| Copy constructor.
|
| Matrix (const int width, const int height, const float value) |
| Constructor with implicit filling.
|
float | norm2 () const |
| Returns the squared norm (i.e. sum of squared values)
|
float & | operator() (const int ax, const int ay) const |
| Gives full access to matrix values.
|
Matrix & | operator*= (const float value) |
| Multiplication with a scalar.
|
Matrix & | operator+= (const float value) |
| Adds a constant to the matrix.
|
Matrix & | operator= (const float value) |
| Fills the matrix with the value value (equivalent to fill())
|
Matrix & | operator= (const Matrix ©From) |
| Copies the matrix copyFrom to this matrix (size of matrix might change)
|
void | rescale (int newWidth, int newHeight) |
| Scales the matrix (includes upsampling and downsampling)
|
void | scharrDerivativeX (Matrix &result) const |
| Applies 3x3 Scharr filter in x direction (result will be in result)
|
void | scharrDerivativeY (Matrix &result) const |
| Applies 3x3 Scharr filter in y direction (result will be in result)
|
void | setSize (int width, int height) |
| Changes the size of the matrix, data will be lost.
|
int | size () const |
| Returns the size (width*height) of the matrix.
|
void | sobelDerivativeX (Matrix &result) const |
| Applies 3x3 Sobel filter in x direction (result will be in result)
|
void | sobelDerivativeY (Matrix &result) const |
| Applies 3x3 Sobel filter in y direction (result will be in result)
|
void | upsample (int newWidth, int newHeight) |
| Upsamples the matrix.
|
void | upsampleBilinear (int newWidth, int newHeight) |
| Upsamples the matrix using bilinear interpolation.
|
void | writeToPGM (const char *filename) const |
| Saves the matrix as a picture in pgm-Format.
|
int | xSize () const |
| Returns the width of the matrix.
|
int | ySize () const |
| Returns the height of the matrix.
|
virtual | ~Matrix () |
| Destructor.
|
Static Public Member Functions |
static Matrix | createWarpMatrix (const float &angle, const float &scale) |
| Creates a warp matrix for scaling / roatating.
|
Protected Attributes |
float * | ivData |
int | ivHeight |
int | ivWidth |
datastructure for images (greyscale or single color)
Definition at line 76 of file Matrix.h.