I am trying to scan a receipt but its scanning vertically. isTable is set to true still its not working
‘multipart’ => [
[ 'isTable' => 'true',
'scale' => 'true',
'OCREngine' => '2',
'name' => 'file',
'contents' => $fileData
]
Is there issue with my php?
Thanks,
Nimmy
admin
April 7, 2021, 7:04pm
2
If you test the connection with Postman, do you get the same result?
You probably know it, but just in case: Postman is a free app, see Free OCR API
If you see the problem even with Postman, a screenshot of the result could be helpful.
Hint: Postman can do code export ! So for example, in the screenshot below it generated PHP code. This cURL PHP call works fine.
See also:
Thanks… The curl option worked well. But i get error while calling the api in between. (mayb 3 times). i am using an image url “https://ocr.space/Content/Images/receipt-ocr-original.jpg ” but it says no image. Do you think the api is down or something?
admin
April 8, 2021, 9:39am
4
The free OCR API servers are sometimes overloaded, for 100% uptime please consider using the PRO plan , it uses different and faster servers.
Having said that, right now all looks fine for the free API:
Do you still see the error? If so, a Postman screenshot would be helpful.
Below is the error i get.
Do you have pay as you go for PRO.
Notice : Trying to get property ‘ParsedResults’ of non-object in C:\xampp\htdocs\samsung-retail\func\curl.php on line 46
Notice : Trying to access array offset on value of type null in C:\xampp\htdocs\samsung-retail\func\curl.php on line 46
Notice : Trying to get property ‘ParsedText’ of non-object in C:\xampp\htdocs\samsung-retail\func\curl.php on line 46
ulrich
April 8, 2021, 3:36pm
6
If you test the connection with Postman, do you get the same result? This looks more like a bug in your code?
Thanks its a problem with my localhost. I have another issue now. when i use OCR engine1 and OCR engine 2 , i get different outputs. i am trying this for receipts.
Also when the image is send from whatsapp again the result changes.
ulrich
April 12, 2021, 12:28pm
8
Cheil_Experiential:
i get different outputs.
Do you mean different OCR results? That is normal - these are two different OCR engines!
For English receipt OCR, the engine2 is usually better.
if i download the same image from whatsapp and scan then the result is different. Is there any way that i can get perfect conversion?
ulrich
April 14, 2021, 2:36pm
10
Cheil_Experiential:
the same image
Can you post both images here?