Above is the image ,I have tried everything I could get from SO or google ,nothing seems to work. I can not get the exact value in image , I should get 2.10 , Instead it always get 210.
And it is not limited to this image only any image which have a decimal before number 1 tesseract ignores the decimal value.
def returnAllowedAmount(self,imgpath):
th = 127
max_val = 255
img = cv2.imread(imgpath,0) #Load Image in Memory
img = cv2.resize(img, None, fx=2.5, fy=2.5, interpolation=cv2.INTER_CUBIC) #rescale Image
img = cv2.medianBlur(img, 1)
ret , img = cv2.threshold(img,th,max_val,cv2.THRESH_TOZERO)
self.showImage(img)
returnData = pytesseract.image_to_string(img,lang='eng',config='-psm 13 ' )
returnData = ''.join(p for p in returnData if p.isnumeric() or p == ".") # REMOVE $ SIGN