- Main Page
- Data Structures
- Files
- Related Pages

# mser.c File Reference

Maximally Stable Extremal Regions (MSER) - Definition. More...

`#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.

## Detailed Description

For internal use only.

Author:
  Andrea Vedaldi

## 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.

VL_INLINE vl_uint climb | ( | VlMserReg * | r,
|  | vl_uint | idx |
| ) |  |  |

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.

Parameters:

  | r | regions' forest.
  | idx | stating 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:

  | f | MSER filter to be deleted.

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

Parameters:

  | f | MSER 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:

  | 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.

Parameters:

  | f | MSER filter.
  | im | image data.