In the previous recipe, you learned how an image can be segmented into regions by gradually flooding it and creating watersheds. The maximally stable external regions (MSER) algorithm uses the same immersion analogy in order to extract meaningful regions in an image. These regions will also be created by flooding the image level by level, but this time, we will be interested in the basins that remain relatively stable for a period of time during the immersion process. It will be observed that these regions correspond to some distinctive parts of the scene objects that are pictured in the image.
Extracting distinctive regions using MSER
How to do it...
The basic class to compute the MSER of an image is cv::MSER. An instance...