For this picture
I have this result:
{“ParsedResults”:[{“TextOverlay”:{“Lines”:,“HasOverlay”:false,“Message”:“Text overlay is not provided as it is not requested”},“TextOrientation”:“0”,“FileParseExitCode”:1,“ParsedText”:“”,“ErrorMessage”:“”,“ErrorDetails”:“”}],“OCRExitCode”:1,“IsErroredOnProcessing”:false,“ProcessingTimeInMilliseconds”:“687”,“SearchablePDFURL”:“Searchable PDF not generated as it was not requested.”}"
but this picture
recognized successfully.
My code on PHP
$data = [‘base64Image’ => $image, ‘OCREngine’ => ‘2’]; //I also tried ‘OCREngine’ => ‘1’
.
$options = [
‘http’ => [
‘header’ => “apikey: K8ХХХХХХХХХХХХХХХ7”,
‘method’ => ‘POST’,
‘content’ => http_build_query($data),
],
];
$context = stream_context_create($options);
$result = file_get_contents($endpoint, false, $context);
Hi, the text font on the captcha image is too small for a good OCR result. But if you enlarge the image for example 300% or 500% the OCR works fine with ocr engine2:
Enlarged captcha ocr api input image:
OCR result:
Thank you! I will try to apply this solution.