This is the image input.
Using python opencv. I did some pre-processing and found contours using
contours,hierarchy = cv2.findContours(thresh,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)
then i did the following to save each character
img1 = cv2.imread("test26.png")
nu = 1
fin = "final"
for cnt in contours:
x,y,w,h = cv2.boundingRect(cnt)
img2 = img1[y:y+h, x:x+w]
img3 = Image.fromarray(img2)
filename = fin + str(nu) + ".png"
nu = nu + 1
img3.save(filename)
But characters are saved in a tree like order. I don't understand the order.
my intention is to get character by character and ocr it in order and save as text.