site/0.6/lib/ccv-util/index.html
ccv_dense_matrix_t* ccv_get_dense_matrix(ccv_matrix_t* mat)
Check and get dense matrix from general matrix structure.
ccv_sparse_matrix_t* ccv_get_sparse_matrix(ccv_matrix_t* mat)
Check and get sparse matrix from general matrix structure.
void ccv_visualize(ccv_matrix_t* a, ccv_matrix_t** b, int type)
Convert a input matrix into a matrix within visual range, so that one can output it into PNG file for inspection.
void ccv_zero(ccv_matrix_t* mat)
Zero out a given matrix.
int ccv_any_nan(ccv_matrix_t *a)
Check if any nan value in the given matrix, and return its position.
void ccv_flatten(ccv_matrix_t* a, ccv_matrix_t** b, int type, int flag)
If a given matrix has multiple channels, this function will compute a new matrix that each cell in the new matrix is the sum of all channels in the same cell of the given matrix.
void ccv_shift(ccv_matrix_t* a, ccv_matrix_t** b, int type, int lr, int rr)
Compute a new matrix that each element is first left shifted and then right shifted.
ccv_dense_vector_t* ccv_get_sparse_matrix_vector(ccv_sparse_matrix_t* mat, int index)
Get vector for a sparse matrix.
ccv_matrix_cell_t ccv_get_sparse_matrix_cell(ccv_sparse_matrix_t* mat, int row, int col)
Get cell from a sparse matrix.
void ccv_set_sparse_matrix_cell(ccv_sparse_matrix_t* mat, int row, int col, void* data)
Set cell for a sparse matrix.
void ccv_compress_sparse_matrix(ccv_sparse_matrix_t* mat, ccv_compressed_sparse_matrix_t** csm)
Transform a sparse matrix into compressed representation.
void ccv_decompress_sparse_matrix(ccv_compressed_sparse_matrix_t* csm, ccv_sparse_matrix_t** smt)
Transform a compressed matrix into a sparse matrix.
int ccv_matrix_eq(ccv_matrix_t* a, ccv_matrix_t* b)
Compare if two matrix are equal (with type). Return 0 if it is.
void ccv_slice(ccv_matrix_t* a, ccv_matrix_t** b, int btype, int y, int x, int rows, int cols)
Slice an input matrix given x, y and row, column size.
void ccv_border(ccv_matrix_t* a, ccv_matrix_t** b, ccv_margin_t margin)
Add border to the input matrix.
void ccv_move(ccv_matrix_t* a, ccv_matrix_t** b, int btype, int y, int x)
Offset input matrix by x, y.
ccv_array_t* ccv_array_new(int rnum, int rsize)
Create a new, self-growing array.
void ccv_array_push(ccv_array_t* array, void* r)
Push a new element into the array.
void ccv_array_zero(ccv_array_t* array)
Zero out the array, it won’t change the array->rnum however.
void ccv_array_clear(ccv_array_t* array)
Clear the array, it will reset the array->rnum to 0.
void ccv_array_free(ccv_array_t* array)
Free up the array.
int ccv_array_group(ccv_array_t* array, ccv_array_t** index, ccv_array_group_f gfunc, void* data)
Group elements in the array from its similarity.
ccv_contour_t* ccv_contour_new(int set)
Create a new contour object.
void ccv_contour_push(ccv_contour_t* contour, ccv_point_t point)
Push a point into the contour object.
void ccv_contour_free(ccv_contour_t* contour)
Free up the contour object.