Documentation>C API
Functions
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.
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.

## Detailed Description

Author
  Andrea Vedaldi

## Function Documentation

## ◆ adv()

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

  ndims | number of dimensions.
  dims | dimensions.
  subs | subscript to advance.

## ◆ climb()

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

  r | regions' forest.
  idx | stating node.

Returns
  index of the reached root.

## ◆ vl_mser_delete()

void vl_mser_delete | ( | VlMserFilt * | f | ) |

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

Parameters

  f | MSER filter to be deleted.

## ◆ vl_mser_ell_fit()

void vl_mser_ell_fit | ( | VlMserFilt * | f | ) |

Parameters

  f | MSER filter.

See also
  Ellipsoids

## ◆ vl_mser_new()

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.

## ◆ vl_mser_process()

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.