Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
import cv2
img = cv2.imread('foo.jpg', cv2.CV_LOAD_IMAGE_GRAYSCALE);
mser = cv2.MSER()
mser_areas = mser.detect()

this returns list of list of points as described in the docu for the operator()

You can also retrieve real keypoints (with associated size etc.) when you use it as feature detector:

fd = cv2.FeatureDetector_create('MSER')
kpts = fd.detect(img)

which you then can pass to a descriptor, which you can e.g. create via cv2.DescriptorExtractor_create("ORB").