Skip to content

Commit

Permalink
updated document, which is generated now
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Dec 21, 2014
1 parent 553c3c7 commit b2fa33e
Show file tree
Hide file tree
Showing 22 changed files with 1,100 additions and 1,022 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion site/doxygen.sh → site/_doxygen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

for f in `find _doxygen/xml -name "group__*.xml"` ; do
./doxygen.rb $f _posts/
./_doxygen.rb $f _posts/
done
137 changes: 87 additions & 50 deletions site/_posts/0000-01-01-ccv-algebra.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,94 +9,131 @@ categories:
- lib
---

ccv_normalize
-------------
ccv\_normalize
--------------

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

Normalize a matrix and return the normalize factor.

* **a**: the input matrix.
* **b**: the output matrix.
* **btype**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **a**: The input matrix.
* **b**: The output matrix.
* **btype**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **flag**: CCV\_L1 or CCV\_L2, for L1 or L2 normalization.

ccv_sat
-------
**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](https://en.wikipedia.org/wiki/Summed\_area\_table).

* **a**: The input matrix.
* **b**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **padding\_pattern**: CCV\_NO\_PADDING - the first row and the first column in the output matrix is the same as the input matrix. CCV\_PADDING\_ZERO - the first row and the first column in the output matrix is zero, thus, the output matrix size is 1 larger than the input matrix.

ccv\_dot
--------

double ccv_dot(ccv_matrix_t *a, ccv_matrix_t *b)

void ccv_sat(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int padding_pattern)
Dot product of two matrix.

Generate the [Summed Area Table](https://en.wikipedia.org/wiki/Summed_area_table).
* **a**: The input matrix.
* **b**: The other input matrix.

* **a**: the input matrix.
* **b**: the output matrix.
* **type**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **padding_pattern**: CCV\_NO\_PADDING - the first row and the first column in the output matrix is the same as the input matrix. CCV\_PADDING\_ZERO - the first row and the first column in the output matrix is zero, thus, the output matrix size is 1 larger than the input matrix.
**return**: Dot product.

ccv_sum
-------
ccv\_sum
--------

double ccv_sum(ccv_matrix_t* mat, int flag)
double ccv_sum(ccv_matrix_t *mat, int flag)

Return the sum of all elements in the matrix.

* **mat**: the input matrix.
* **mat**: The input matrix.
* **flag**: CCV\_UNSIGNED - compute fabs(x) of the elements first and then sum up. CCV\_SIGNED - compute the sum normally.

ccv_multiply
------------
ccv\_variance
-------------

double ccv_variance(ccv_matrix_t *mat)

Return the sum of all elements in the matrix.

void ccv_multiply(ccv_matrix_t* a, ccv_matrix_t* b, ccv_matrix_t** c, int type)
* **mat**: The input 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.

* **a**: the input matrix.
* **b**: the input matrix.
* **c**: the output matrix.
* **type**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **a**: The input matrix.
* **b**: The input matrix.
* **c**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.

ccv\_add
--------

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

ccv_subtract
------------
Matrix addition.

void ccv_subtract(ccv_matrix_t* a, ccv_matrix_t* b, ccv_matrix_t** c, int type)
* **a**: The input matrix.
* **b**: The input matrix.
* **c**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.

ccv\_subtract
-------------

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

Matrix subtraction.

* **a**: the input matrix.
* **b**: the input matrix.
* **c**: the output matrix.
* **type**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **a**: The input matrix.
* **b**: The input matrix.
* **c**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.

ccv_scale
---------
ccv\_scale
----------

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

Scale given matrix by factor of **ds**.

* **a**: the input matrix.
* **b**: the output matrix.
* **type**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **ds**: the scale factor, `b = a * ds`
* **a**: The input matrix.
* **b**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **ds**: The scale factor, `b = a * ds`

ccv_gemm
--------
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)
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](http://www.netlib.org/blas/) library.

As general as it is, it computes:

alpha * A * B + beta * C
alpha * A * B + beta * C

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

* **a**: the input matrix.
* **b**: the input matrix.
* **alpha**: the multiplication factor.
* **c**: the input matrix.
* **beta**: the multiplication factor.
* **a**: The input matrix.
* **b**: The input matrix.
* **alpha**: The multiplication factor.
* **c**: The input matrix.
* **beta**: The multiplication factor.
* **transpose**: CCV\_A\_TRANSPOSE, CCV\_B\_TRANSPOSE to indicate if matrix A or B need to be transposed first before multiplication.
* **d**: the output matrix.
* **type**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **d**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
66 changes: 33 additions & 33 deletions site/_posts/0000-01-01-ccv-basic.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,54 @@ categories:

The utilities in this file provides basic pre-processing which, most-likely, are the first steps for computer vision algorithms.

ccv_sobel
---------
ccv\_sobel
----------

void ccv_sobel(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, int dx, int dy)
void ccv_sobel(ccv_dense_matrix_t *a, ccv_dense_matrix_t **b, int type, int dx, int dy)

Compute image with [Sobel operator](https://en.wikipedia.org/wiki/Sobel_operator).
Compute image with [Sobel operator](https://en.wikipedia.org/wiki/Sobel\_operator).

* **a**: the input matrix.
* **b**: the output matrix.
* **type**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **dx**: the window size of Sobel operator on x-axis, specially optimized for 1, 3
* **dy**: the window size of Sobel operator on y-axis, specially optimized for 1, 3
* **a**: The input matrix.
* **b**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **dx**: The window size of Sobel operator on x-axis, specially optimized for 1, 3
* **dy**: The window size of Sobel operator on y-axis, specially optimized for 1, 3

ccv_gradient
------------
ccv\_gradient
-------------

void ccv_gradient(ccv_dense_matrix_t* a, ccv_dense_matrix_t** theta, int ttype, ccv_dense_matrix_t** m, int mtype, int dx, int dy)
void ccv_gradient(ccv_dense_matrix_t *a, ccv_dense_matrix_t **theta, int ttype, ccv_dense_matrix_t **m, int mtype, int dx, int dy)

Compute the gradient (angle and magnitude) at each pixel.

* **a**: the input matrix.
* **theta**: the output matrix of angle at each pixel.
* **ttype**: the type of output matrix, if 0, ccv will defaults to CCV\_32F.
* **m**: the output matrix of magnitude at each pixel.
* **mtype**: the type of output matrix, if 0, ccv will defaults to CCV\_32F.
* **dx**: the window size of the underlying Sobel operator used on x-axis, specially optimized for 1, 3
* **dy**: the window size of the underlying Sobel operator used on y-axis, specially optimized for 1, 3
* **a**: The input matrix.
* **theta**: The output matrix of angle at each pixel.
* **ttype**: The type of output matrix, if 0, ccv will defaults to CCV\_32F.
* **m**: The output matrix of magnitude at each pixel.
* **mtype**: The type of output matrix, if 0, ccv will defaults to CCV\_32F.
* **dx**: The window size of the underlying Sobel operator used on x-axis, specially optimized for 1, 3
* **dy**: The window size of the underlying Sobel operator used on y-axis, specially optimized for 1, 3

ccv_flip
--------
ccv\_flip
---------

void ccv_flip(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int btype, int type)
void ccv_flip(ccv_dense_matrix_t *a, ccv_dense_matrix_t **b, int btype, int type)

Flip the matrix by x-axis, y-axis or both.

* **a**: the input matrix.
* **b**: the output matrix (it is in-place safe).
* **btype**: the type of output matrix, if 0, ccv will use the sample type as the input matrix.
* **a**: The input matrix.
* **b**: The output matrix (it is in-place safe).
* **btype**: The type of output matrix, if 0, ccv will use the sample type as the input matrix.
* **type**: CCV\_FLIP\_X - flip around x-axis, CCV\_FLIP\_Y - flip around y-axis.

ccv_blur
--------
ccv\_blur
---------

void ccv_blur(ccv_dense_matrix_t* a, ccv_dense_matrix_t** b, int type, double sigma)
void ccv_blur(ccv_dense_matrix_t *a, ccv_dense_matrix_t **b, int type, double sigma)

Using [Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur) on a given matrix. It implements a O(n * sqrt(m)) algorithm, n is the size of input matrix, m is the size of Gaussian filtering kernel.
Using [Gaussian blur](https://en.wikipedia.org/wiki/Gaussian\_blur) on a given matrix. It implements a O(n * sqrt(m)) algorithm, n is the size of input matrix, m is the size of Gaussian filtering kernel.

* **a**: the input matrix.
* **b**: the output matrix.
* **type**: the type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **sigma**: the sigma factor in Gaussian filtering kernel.
* **a**: The input matrix.
* **b**: The output matrix.
* **type**: The type of output matrix, if 0, ccv will try to match the input matrix for appropriate type.
* **sigma**: The sigma factor in Gaussian filtering kernel.
Loading

0 comments on commit b2fa33e

Please sign in to comment.