mser = cv2.MSER_create() regions,_= mser.detectRegions(gray) for region in regions: x, y, w, h = cv2.boundingRect(region) cv2.rectangle(img, (x, y), (x + w, y + h), (0, 255, 0), 2)
cv2_imshow(img)
#Perform OCR after MSER detection on image
reader=easyocr.Reader(['en','en']) results=reader.readtext(gray) for x in results: print(x[1])