문제

I'm looking for an image that contains some certain text on my machine running Ubuntu 12.04

Say for example I'm looking for "Some text here," like in the folliwing image: some text

I want to be able to find any larger images containing that text on my hard drive: larger image

Is there a way to search my machine for that?

Thanks for any tips!

도움이 되었습니까?

해결책

Check out tesseract, it should do the job: https://code.google.com/p/tesseract-ocr/wiki/ReadMe

You can run:

tesseract Sometext_big.png out.txt

And out.txt will contain "Some text here".

Then it's just a matter of some shell scripting to call find to find all of the images of a particular type, run them through tesseract and see if the output file contains the text you want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top