Answer the question
In order to leave comments, you need to log in
Cut pictures how?
Dear colleagues!
The question arose with the cutting of words from the picture. Decided to try opencv.
# ОТКРЫВАЕМ КАРТИНКУ
imge = cv2.imread(image_file, cv2.IMREAD_GRAYSCALE)
# УВЕЛИЧИВАЕМ РАЗМЕР КАРТИНКИ
scale_percent = 250 # percent of original size
width = int(imge.shape[1] * scale_percent / 100)
height = int(imge.shape[0] * scale_percent / 100)
dim = (width, height)
img = cv2.resize( imge, dim, interpolation = cv2.INTER_AREA)
#РАЗМЫТИЕ ПО ГАУССУ
blur = cv2.GaussianBlur(img, (5, 5), 0)
#ВОЗВРАЩАЕМ В ЧЕРНО-БЕЛОЕ
ret, thresh = cv2.threshold(blur, 61, 255, 1)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question