Image.MSER#

Image.MSER(**kwargs: Any) MSERFeature[source]#

Find MSER features in image

Parameters:

kwargs – arguments passed to opencv.MSER_create

Returns:

set of MSER features

Return type:

MSERFeature

Find all the maximally stable extremal regions in the image and return an object that represents the MSERs found. The object behaves like a list and can be indexed, sliced and used as an iterator in for loops and comprehensions.

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.Read("castle.png")
>>> mser = img.MSER()
>>> len(mser)  # number of features
4
>>> mser[:5].bbox
array([[   1,  658,   31,  736],
       [1128,  834, 1279,  925],
       [ 274,  591,  307,  625],
       [ 687,  706,  697,  715]], shape=(4, 4), dtype=int32)
References:
Seealso:

MSERFeature, cv2.MSER_create