#include "mser.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
Functions | |
VL_INLINE void | adv (int ndims, int const *dims, int *subs) |
Advance N-dimensional subscript. | |
VL_INLINE vl_uint | climb (VlMserReg *r, vl_uint idx) |
Climb the region forest to reach aa root. | |
VlMserFilt * | vl_mser_new (int ndims, int const *dims) |
Create a new MSER filter. | |
void | vl_mser_delete (VlMserFilt *f) |
Delete MSER filter. | |
void | vl_mser_process (VlMserFilt *f, vl_mser_pix const *im) |
Process image. | |
void | vl_mser_ell_fit (VlMserFilt *f) |
Fit ellipsoids. |
For internal use only.
VL_INLINE void adv | ( | int | ndims, | |
int const * | dims, | |||
int * | subs | |||
) |
The function increments by one the subscript subs indexing an array the ndims dimensions dims.
ndims | number of dimensions. | |
dims | dimensions. | |
subs | subscript to advance. |
The function climbs the regions forest r starring from the node idx to the correspoding root.
To speed-up the operation, the function uses the VlMserReg::shortcut field to quickly jump to the root. After the root is reached, all the used shortcut are updated.
r | regions' forest. | |
idx | stating node. |
void vl_mser_delete | ( | VlMserFilt * | f | ) |
The function releases the MSER filter f and all its resources.
f | MSER filter to be deleted. |
void vl_mser_ell_fit | ( | VlMserFilt * | f | ) |
VlMserFilt* vl_mser_new | ( | int | ndims, | |
int const * | dims | |||
) |
Initializes a new MSER filter for images of the specified dimensions. Images are ndims -dimensional arrays of dimensions dims.
ndims | number of dimensions. | |
dims | dimensions. |
void vl_mser_process | ( | VlMserFilt * | f, | |
vl_mser_pix const * | im | |||
) |
The functions calculates the Maximally Stable Extremal Regions (MSERs) of image im using the MSER filter f.
The filter f must have been initialized to be compatible with the dimensions of im.
f | MSER filter. | |
im | image data. |