Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tesseract-ocr-for-php in laravel 5.2 #46

Closed
buihoang91tin opened this issue May 16, 2016 · 12 comments
Closed

tesseract-ocr-for-php in laravel 5.2 #46

buihoang91tin opened this issue May 16, 2016 · 12 comments

Comments

@buihoang91tin
Copy link

I make all step to install this library into laravel 5.2
and I use this into my Controller but it's return null and make nothing.
Could you have me. This is my code

image

But it's return blank page

@buihoang91tin
Copy link
Author

Is this oke with tesseract v3.02.
I dont know how to install v3.03 on windows. Could you help me this issues

@buihoang91tin
Copy link
Author

I have installed tesseract v3.03 success and run this command is ok "tesseract test.png stdout"
But when I try in laravel PHP is still give me blank page. Could you help me

@thiagoalessio
Copy link
Owner

Hello, I need more information to be able to help ... can you share the image you are trying to recognise?
Also make sure the user who runs PHP has tesseract on its $PATH (otherwise you have to specify the executable location (/~https://github.com/thiagoalessio/tesseract-ocr-for-php#-executablepathtotesseract).

@thiagoalessio
Copy link
Owner

didn't hear back from you, closing this issue for now ... if you still have the issue, or if you found a solution and mind to share with others, please feel free to reopen ;D

@buihoang91tin
Copy link
Author

This is my code
image

And this is result just show object but not show result
image

I dont now how to resolve this

@buihoang91tin
Copy link
Author

Please reopen my issue. Sorry for later...

@kevin-and-eva
Copy link

same problem here.
can someone help us out?

@kevin-and-eva
Copy link

I set executable like this
echo (new TesseractOCR(storage_path('app\user_72\capture.jpg')))
->executable('C:\Program Files (x86)\Tesseract-OCR\tesseract.exe')
->run();

but the result was nothing.

@esdeguzman
Copy link

esdeguzman commented May 9, 2017

Hi @thiagoalessio , I have the same issue as @fredtheryick.
My code is exaxtly like his.

$tesseract = new TesseractOCR(public_path('sample.jpg'));
$tesseract->executable('C:\Program Files (x86)\Tesseract-OCR\tesseract.exe');
dd($tesseract->run());

But it returns nothings.

@kevin-and-eva
Copy link

kevin-and-eva commented May 9, 2017

Hi @VisualTrauma, maybe this can help you.
$tesseract = (new TesseractOCR(storage_path('app\' . $file)))
->executable('"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe"')
->lang('eng')
->run();

just add double quote on executable

@esdeguzman
Copy link

Thank you @fredtheryick, Can you tell me why does it have to be inside a double qoute? Sorry if this is such a noob question.

@kevin-and-eva
Copy link

you are welcome @VisualTrauma
so actually this code will work too
->executable("C:\Program Files (x86)\Tesseract-OCR\tesseract.exe")
just double quote.

the explanation why is in this link
http://stackoverflow.com/questions/25305869/when-should-you-use-single-or-double-quotes-in-php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants