Documentation>C API
mser.c File Reference

MSER - Definition. More...

#include "mser.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>

Functions

void adv (int ndims, int const *dims, int *subs)
 Advance N-dimensional subscript. More...
 
vl_uint climb (VlMserReg *r, vl_uint idx)
 Climb the region forest to reach aa root. More...
 
VlMserFilt * vl_mser_new (int ndims, int const *dims)
 Create a new MSER filter. More...
 
void vl_mser_delete (VlMserFilt *f)
 Delete MSER filter. More...
 
void vl_mser_process (VlMserFilt *f, vl_mser_pix const *im)
 Process image. More...
 
void vl_mser_ell_fit (VlMserFilt *f)
 Fit ellipsoids. More...
 

Detailed Description

Author
Andrea Vedaldi

Function Documentation

void adv ( int  ndims,
int const *  dims,
int *  subs 
)
inline

The function increments by one the subscript subs indexing an array the ndims dimensions dims.

Parameters
ndimsnumber of dimensions.
dimsdimensions.
subssubscript to advance.
vl_uint climb ( VlMserReg *  r,
vl_uint  idx 
)
inline

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
rregions' forest.
idxstating node.
Returns
index of the reached root.
void vl_mser_delete ( VlMserFilt *  f)

The function releases the MSER filter f and all its resources.

Parameters
fMSER filter to be deleted.
void vl_mser_ell_fit ( VlMserFilt *  f)
Parameters
fMSER filter.
See also
Ellipsoids
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
ndimsnumber of dimensions.
dimsdimensions.
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
fMSER filter.
imimage data.