opencvmser

Exact Meaning of the parameters given to initialize MSER in OpenCV 2.4.x?


OpenCV reference manual (2.4.x) states that the constructor that initializes MSER requires the following parameters:

delta, min_area, max_area, max_variation, min_diversity, max_evolution, area_threshold, min_margin, edge_blur_size.

I am dealing with grayscale images. What is the use of the parameters "delta", "max_variation" and "min_diversity"? What property of an MSER do these parameters help control?

I have tried a lot to find the exact answer to this and I could only find a little information on the following pages (none of which was particularly useful in telling me what exactly do these 3 parameters control): 1. OpenCV wiki 2. Wikipedia description of MSER 3. MSER questions on STackOverflow

Please help!


Solution

  • I am going to presume that you know the basics of how MSER feature detection works (if not, Wikipedia, and short recap follows).

    You have two types of MSER regions, positive and negative.

    First type, you get by thresholding with all intensities (for grayscale images, 0 to 255). E.g. for a threshold T = 100, all pixels with intensity < 100 are assigned black, or foreground, and all pixels >= 100 intensity are white or background.

    Now, imagine you're observing a specific pixel p. At some threshold, let's call it T1, it will start belonging to the foreground and stay that way until T=255. At T1 a pixel will belong to a component CC_T1(p). 5 gray levels later, it will belong to the component CC_(T1+5)(p).

    All of these connected components, obtained for all the thresholds, are potential candidates for MSER. (Other type of components is obtained if you reverse my black/foreground and white/background assignments for thresholding).

    Parameters help decide which potential candidates are indeed maximally stable: