Ask Your Question

Revision history [back]

i tested detectTextSWT for the first time with the code below.

import cv2

img = cv2.imread('16017999024332957.jpg')
rects, draw, chainBBs   = cv2.text.detectTextSWT(img, True)
for rect in rects:
    cv2.rectangle(img, rect, (255,0,0), 2)
cv2.imshow("img", img)
cv2.imshow("image", draw)
cv2.waitKey(0)
cv2.destroyAllWindows()

input

image description

output

image description -- image description