Hi Lada, Since you are already using opencv, it might be an option for extracting the region based on shape. Adrian Rosebrock has an example of shape detection with opencv here [1]. I put together a simple example [2] in python that extracts the biggest rectangle, which would be the area with the number in the sample.
art --- 1. http://www.pyimagesearch.com/2016/02/08/opencv-shape-detection/ 2. http://ink.ourdigitalworld.org/boxcrop.py From: tesseract-ocr@googlegroups.com [mailto:tesseract-ocr@googlegroups.com] On Behalf Of Lada Tylich Sent: Thursday, August 31, 2017 9:56 AM To: tesseract-ocr <tesseract-ocr@googlegroups.com> Subject: [tesseract-ocr] Image preprocessing Hi, I am writing in referring to my recent post<https://groups.google.com/forum/#!topic/tesseract-ocr/hJzEfZ2_7tY>. I figured out I should stick to this<https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuality>. So far I have applied few times denoising with cv2.fastNlMeansDenoisingColored on colored image then binarization and scale with 2. Image I got is below with tesseract result: CFC I 2:. . gen: Therefore I am looking for some way to exctract the area with a number (that with opposite contrast). According to tests I made (creating subsections by hand and applying tesseract on it), that could lead me to better result. Could anyone please help me to figure this out and prepare this image for tesseract? Thanks in advance. -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com<mailto:tesseract-ocr+unsubscr...@googlegroups.com>. To post to this group, send email to tesseract-ocr@googlegroups.com<mailto:tesseract-ocr@googlegroups.com>. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/a7b1369c-af13-470f-8ac0-5a2e09028f2b%40googlegroups.com<https://groups.google.com/d/msgid/tesseract-ocr/a7b1369c-af13-470f-8ac0-5a2e09028f2b%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To post to this group, send email to tesseract-ocr@googlegroups.com. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/YTXPR01MB0574296E13075216D15D5857DC960%40YTXPR01MB0574.CANPRD01.PROD.OUTLOOK.COM. For more options, visit https://groups.google.com/d/optout.