ccv

A Modern Computer Vision Library

View the Project on GitHub liuliu/ccv

lib/ccv_algebra.c

ccv_normalize

double ccv_normalize(ccv_matrix_t *a, ccv_matrix_t **b, int btype, int flag)

Normalize a matrix and return the normalize factor.

return: L1 or L2 sum.

ccv_sat

void ccv_sat(ccv_dense_matrix_t *a, ccv_dense_matrix_t **b, int type, int padding_pattern)

Generate the Summed Area Table.

ccv_dot

double ccv_dot(ccv_matrix_t *a, ccv_matrix_t *b)

Dot product of two matrix.

return: Dot product.

ccv_sum

double ccv_sum(ccv_matrix_t *mat, int flag)

Return the sum of all elements in the matrix.

ccv_variance

double ccv_variance(ccv_matrix_t *mat)

Return the sum of all elements in the matrix.

return: Element variance of the input matrix.

ccv_multiply

void ccv_multiply(ccv_matrix_t *a, ccv_matrix_t *b, ccv_matrix_t **c, int type)

Do element-wise matrix multiplication.

ccv_add

void ccv_add(ccv_matrix_t *a, ccv_matrix_t *b, ccv_matrix_t **c, int type)

Matrix addition.

ccv_subtract

void ccv_subtract(ccv_matrix_t *a, ccv_matrix_t *b, ccv_matrix_t **c, int type)

Matrix subtraction.

ccv_scale

void ccv_scale(ccv_matrix_t *a, ccv_matrix_t **b, int type, double ds)

Scale given matrix by factor of ds.

ccv_gemm

void ccv_gemm(ccv_matrix_t *a, ccv_matrix_t *b, double alpha, ccv_matrix_t *c, double beta, int transpose, ccv_matrix_t **d, int type)

General purpose matrix multiplication. This function has a hard dependency on cblas library.

As general as it is, it computes:

alpha * A * B + beta * C

whereas A, B, C are matrix, and alpha, beta are scalar.

‹  back 

comments powered by Disqus