Re: [tesseract-ocr] Help with detecting a code on an image

2022-11-01 Thread nabil-ak
*Thanks for all the help.* *I tried closing as a morphological transformation and also used a threshold to get a black and white picture.* *I got "BYC3 .- A4UFYY.QLBGY -+ " as a answer this is almost right.* *Is there anything else that i can do to improve the detection?* *i attached the python

Re: [tesseract-ocr] Help with detecting a code on an image

2022-10-31 Thread Nikhil Fande
Hi, Combination of image deskewing and image inversion should work. Use PSM 11 on processed image, it will detect most of the characters. Thanks, Nikhil On Tue, Nov 1, 2022, 6:16 AM kwmz...@gmail.com wrote: > So I think you could also try using some morphological transformation; I > feel like

Re: [tesseract-ocr] Help with detecting a code on an image

2022-10-31 Thread kwmz...@gmail.com
So I think you could also try using some morphological transformation; I feel like dilation could help a lot too On Monday, October 31, 2022 at 2:01:36 PM UTC-4 nabil-ak wrote: > https://imagetotext.info/ > > If i use a website like this one it can extract the text perfectly and > they also us

Re: [tesseract-ocr] Help with detecting a code on an image

2022-10-31 Thread nabil-ak
https://imagetotext.info/ If i use a website like this one it can extract the text perfectly and they also use tesseract. There has to be some preproccesing/setting that makes tesseract detect the text perfectly. nabil-ak schrieb am Montag, 31. Oktober 2022 um 13:55:56 UTC+1: > *I also tried R

Re: [tesseract-ocr] Help with detecting a code on an image

2022-10-31 Thread nabil-ak
*I also tried Rotation but its still not working.* *These are the preprocessing steps that i used:* import cv2 import pytesseract import numpy as np from scipy import ndimage img = cv2.imread('voucher.png') img = cv2.bitwise_not(img) img = cv2.resize(img, None, fx=1.2, fy=1.2, interpolation=cv

Re: [tesseract-ocr] Help with detecting a code on an image

2022-10-31 Thread Umanda Dikwatta
Did you try all the preprocessing steps? Rotation / Deskewing ? I think Tesseract finds it difficult to identify skewed images. On Mon, Oct 31, 2022 at 1:17 PM nabil-ak wrote: > Hello, > > I want to detect a code (combination of characters) on an image in python. > > I already tried EasyOCR