Area of text detector

image = cv2.imread

gray

#Gausse blur

image_blur = cv2.GaussianBlur(image_gray, (3,3), 0)

thresh = cv2.adaptiveThreshhold(image_blur, 255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY_INV, 21, 28)

#Dilate

kenerl = cv2. getStructutrElement(cv2.MORPH_REC, (7,7))

dilate = cv2.dilate(thresh, kernel, iterations=4)

contours, hie = cv2.findContours(image=dilate, cv2.RETR_EXTERNAL, method=cv2.CHAIN_APPROX_SIMPLE)

…..

Published by Blackcat

SW Engineer

Leave a comment

Design a site like this with WordPress.com
Get started