Documentation>C API
Data Structures | Macros | Typedefs
mser.h File Reference

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

`#include "generic.h"`

## Data Structures

struct | VlMserStats
| MSER filter statistics definition. More...
struct | VlMserReg
| MSER: basic region (declaration). More...
struct | VlMserExtrReg
| MSER: extremal region (declaration). More...
struct | VlMserFilt
| MSER filter. More...

## Macros

#define | VL_MSER_PIX_MAXVAL 256
| Maximum value.
#define | VL_MSER_VOID_NODE ((1ui64<<32) - 1)
| Basic region flag: null region.

## Typedefs

typedef vl_uint8 | vl_mser_pix
| MSER image data type.
typedef float | vl_mser_acc
| MSER accumulator data type.

## Functions

Construction and Destruction
VlMserFilt * | vl_mser_new (int ndims, int const *dims)
| Create a new MSER filter.
void | vl_mser_delete (VlMserFilt *f)
| Delete MSER filter.
Processing
void | vl_mser_process (VlMserFilt *f, vl_mser_pix const *im)
| Process image.
void | vl_mser_ell_fit (VlMserFilt *f)
| Fit ellipsoids.
Retrieving data
vl_uint | vl_mser_get_regions_num (VlMserFilt const *f)
| Get number of maximally stable extremal regions.
vl_uint const * | vl_mser_get_regions (VlMserFilt const *f)
| Get maximally stable extremal regions.
float const * | vl_mser_get_ell (VlMserFilt const *f)
| Get ellipsoids.
vl_uint | vl_mser_get_ell_num (VlMserFilt const *f)
| Get number of ellipsoids.
vl_uint | vl_mser_get_ell_dof (VlMserFilt const *f)
| Get number of degrees of freedom of ellipsoids.
VlMserStats const * | vl_mser_get_stats (VlMserFilt const *f)
| Get statistics.
Retrieving parameters
vl_mser_pix | vl_mser_get_delta (VlMserFilt const *f)
| Get delta.
double | vl_mser_get_min_area (VlMserFilt const *f)
| Get minimum region area.
double | vl_mser_get_max_area (VlMserFilt const *f)
| Get maximum region area.
double | vl_mser_get_max_variation (VlMserFilt const *f)
| Get maximum region variation.
double | vl_mser_get_min_diversity (VlMserFilt const *f)
| Get minimum diversity.
Setting parameters
void | vl_mser_set_delta (VlMserFilt *f, vl_mser_pix x)
| Set delta.
void | vl_mser_set_min_area (VlMserFilt *f, double x)
| Set minimum region area.
void | vl_mser_set_max_area (VlMserFilt *f, double x)
| Set maximum region area.
void | vl_mser_set_max_variation (VlMserFilt *f, double x)
| Set maximum region variation.
void | vl_mser_set_min_diversity (VlMserFilt *f, double x)
| Set minimum diversity.

## Detailed Description

Author
  Andrea Vedaldi

## Macro Definition Documentation

## ◆ VL_MSER_PIX_MAXVAL

#define VL_MSER_PIX_MAXVAL 256

Maximum value of the integer type vl_mser_pix.

## ◆ VL_MSER_VOID_NODE

#define VL_MSER_VOID_NODE ((1ui64<<32) - 1)

## Typedef Documentation

## ◆ vl_mser_acc

typedef float vl_mser_acc

This is a large integer type. It should be large enough to contain a number equal to the area (volume) of the image by the image width by the image height (for instance, if the image is a square of side 256, the maximum value is 256 x 256 x 256).

## ◆ vl_mser_pix

typedef vl_uint8 vl_mser_pix

This is the data type of the image pixels. It has to be an integer.

## Function Documentation

## ◆ 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_get_delta()

vl_mser_pix vl_mser_get_delta | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  value of `delta`.

## ◆ vl_mser_get_ell()

float const * vl_mser_get_ell | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  ellipsoids.

## ◆ vl_mser_get_ell_dof()

vl_uint vl_mser_get_ell_dof | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  number of degrees of freedom.

## ◆ vl_mser_get_ell_num()

vl_uint vl_mser_get_ell_num | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  number of ellipsoids

## ◆ vl_mser_get_max_area()

double vl_mser_get_max_area | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  maximum region area.

## ◆ vl_mser_get_max_variation()

double vl_mser_get_max_variation | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  maximum region variation.

## ◆ vl_mser_get_min_area()

double vl_mser_get_min_area | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  minimum region area.

## ◆ vl_mser_get_min_diversity()

double vl_mser_get_min_diversity | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  value of `minimum` diversity.

## ◆ vl_mser_get_regions()

vl_uint const * vl_mser_get_regions | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  array of MSER pivots.

## ◆ vl_mser_get_regions_num()

vl_uint vl_mser_get_regions_num | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  number of MSERs.

## ◆ vl_mser_get_stats()

VlMserStats const * vl_mser_get_stats | ( | VlMserFilt const * | f | ) |

inline

Parameters

  f | MSER filter.

Returns
  statistics.

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

## ◆ vl_mser_set_delta()

void vl_mser_set_delta | ( | VlMserFilt * | f,
|  | vl_mser_pix | x )

inline

Parameters

  f | MSER filter.
  x | value of `delta`.

## ◆ vl_mser_set_max_area()

void vl_mser_set_max_area | ( | VlMserFilt * | f,
|  | double | x )

inline

Parameters

  f | MSER filter.
  x | maximum region area.

## ◆ vl_mser_set_max_variation()

void vl_mser_set_max_variation | ( | VlMserFilt * | f,
|  | double | x )

inline

Parameters

  f | MSER filter.
  x | maximum region variation.

## ◆ vl_mser_set_min_area()

void vl_mser_set_min_area | ( | VlMserFilt * | f,
|  | double | x )

inline

Parameters

  f | MSER filter.
  x | minimum region area.

## ◆ vl_mser_set_min_diversity()

void vl_mser_set_min_diversity | ( | VlMserFilt * | f,
|  | double | x )

inline

Parameters

  f | MSER filter.
  x | value of `minimum` diversity.