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 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]], shape=(5, 4), dtype=int32)
- References:
P. Corke, Robotics, Vision & Control for Python, Springer, 2023, Section 12.1.1.2.
- Seealso:
MSERFeature, cv2.MSER_create