machinevisiontoolbox.Image.MSER
- Image.MSER(**kwargs)
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 899 >>> mser[:5].bbox array([[ 1, 4, 145, 95], [ 1, 184, 182, 274], [1243, 179, 1279, 258], [1243, 179, 1279, 258], [1242, 178, 1279, 258]], dtype=int32)
- References:
Robotics, Vision & Control for Python, Section 12.1.1.2, P. Corke, Springer 2023.
- Seealso:
MSERFeature
, cv2.MSER_create