mser.c File Reference
Detailed Description
For internal use only.
Definition in file mser.c.
#include "mser.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
Go to the source code of this file.
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. | |
VL_EXPORT VlMserFilt * | vl_mser_new (int ndims, int const *dims) |
Create a new MSER filter. | |
VL_EXPORT void | vl_mser_delete (VlMserFilt *f) |
Delete MSER filter. | |
VL_EXPORT void | vl_mser_process (VlMserFilt *f, vl_mser_pix const *im) |
Process image. | |
VL_EXPORT void | vl_mser_ell_fit (VlMserFilt *f) |
Fit ellipsoids. |
Function Documentation
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.
- Parameters:
-
ndims number of dimensions. dims dimensions. subs subscript to advance.
Definition at line 202 of file mser.c.
Referenced by vl_mser_ell_fit().
The function climbs the regions forest r starting from the node idx to the corresponding 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.
- Parameters:
-
r regions' forest. idx stating node.
- Returns:
- index of the reached root.
Definition at line 227 of file mser.c.
References _VlMserReg::shortcut.
Referenced by vl_mser_process().
VL_EXPORT void vl_mser_delete | ( | VlMserFilt * | f | ) |
VL_EXPORT void vl_mser_ell_fit | ( | VlMserFilt * | f | ) |
- Parameters:
-
f MSER filter.
- See also:
- Ellipsoids
Definition at line 849 of file mser.c.
References _VlMserFilt::acc, adv(), _VlMserReg::area, _VlMserFilt::dof, _VlMserFilt::ell, _VlMserFilt::nel, _VlMserFilt::nell, _VlMserFilt::nmer, _VlMserReg::parent, _VlMserFilt::rell, vl_free(), and vl_malloc().
VL_EXPORT 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.
- Parameters:
-
ndims number of dimensions. dims dimensions.
Definition at line 284 of file mser.c.
References vl_calloc(), and vl_malloc().
VL_EXPORT 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.
- Parameters:
-
f MSER filter. im image data.
Definition at line 382 of file mser.c.
References _VlMserExtrReg::area, _VlMserReg::area, climb(), _VlMserFilt::er, _VlMserReg::height, _VlMserExtrReg::index, _VlMserExtrReg::max_stable, _VlMserFilt::mer, _VlMserExtrReg::parent, _VlMserReg::parent, _VlMserFilt::rer, _VlMserFilt::rmer, _VlMserExtrReg::shortcut, _VlMserReg::shortcut, _uMexOption::val, _VlMserExtrReg::value, _VlMserExtrReg::variation, vl_free(), vl_malloc(), VL_MAX, VL_MSER_PIX_MAXVAL, and VL_MSER_VOID_NODE.