OpenCV version 3.3.1 has an implementation of MSER algorithm, and one possible option is setPass2Only, but it's not specify in the documentation what is it for: https://docs.opencv.org/trunk/d3/d28/classcv_1_1MSER.html#aba564613ffdcd6a89ef0e381c4b02c48 I don't understand exactly how is the implementation of the algorithm, but what I understand from what I see, is that one could use that option to run just the "brighter to darker" part of the algorithm, but if this is like this, how is it if I want to run "darker to brighter" only?
Asked
Active
Viewed 413 times
3
-
Jus a quick question are you referring python opencv? Or the original c++ – user1767754 Nov 28 '17 at 18:02
-
1It's the same, the Python part is just a wrap for the C++ – facug91 Nov 28 '17 at 18:10
-
Python doesn't include all features – user1767754 Nov 28 '17 at 18:11
-
mser.setPass2Only(True) works in python – Yonatan Simson Nov 28 '18 at 16:03
1 Answers
2
The MSER algorithm consists of 2 steps:
- MSER+ : darker to brighter
- MSER- : brighter to darker.
You can see in the OpenCV source code that pass2only
parameters allows to execute only one step, namely MSER-.
If you want to execute only the MSER+ step
- invert the input image
- run the MSER- step on the inverted image

Miki
- 40,887
- 13
- 123
- 202