Ask Your Question

penelope's profile - activity

2013-09-19 06:44:38 -0600 commented question MSER detection error: detected region not extremal

@berak I just reported it here. Thanks

2013-09-18 10:18:22 -0600 asked a question MSER detection error: detected region not extremal

I am writing my own implementation of MSER (Maximally Stable Extremal Regions) detectors and was using OpenCV implementation to check the correctness of my results. When comparing the detections, I came across a region detected by OpenCV implementation that is not extremal.

From the original paper, the definition of positive (maximum intensity) extremal region is that all the pixels belonging to the region have the intensity strictly higher than the border pixels.

While examining a region detected by OpenCV implementation but not my own detector, I found a region pixel with same intensity as one of the border pixels.

I was using a grayscale Lena Image. OpenCV version used is 2.3.1, but I've skimmed the code of the current version and there do not seem to be any major differences. The OpenCV parameters used are:

  • [minArea, maxArea] = [60, 20000]
  • delta = 30 (at this level, there is only 6 OpenCV detections so it is easy to examine them)
  • maxDiversity = 0.25
  • minVariation = 0.2

I've written a simple test-routine that checks the values of all in-region pixels against all border pixels, and four of them are not extremal (the highest-value border intensity pixel is the same as lowest-value region pixel or vice-versa). Here are the sizes (in pixels) of those regions, and the range of pixel intensities for border pixels and region pixels:

  • size: 14659, inside: [24, 82], border: [82, 187]
  • size: 11296, inside: [21, 93], border: [93, 218]
  • size: 6187, inside: [125, 215], border: [82, 125]
  • size: 15785, inside: [76, 212], border: [30, 76]

Note that I adopted the variation formula in my implementation to the one used by OpenCV (||R_{i}-R_{i-delta}||/||R_{i-delta}|| instead of||R_{i+delta}-R_{i-delta}||/||R_{i}||) and I am getting very similar regions with my own implementation, although not the same (all of my regions are extremal).

So, bottom line, even if I am getting very similar results with both OpenCV implementation and my own, the regions detected by OpenCV implementation are not extremal and I believe this is an error.