Android ocr

컴퓨터에서 Nox 의 이미지를 가져온다
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png

마우스 액션을 기억 한다

파이썬으로 특정영역을 ocr 하여
텍스트를 가져온다


https://m.blog.naver.com/PostView.nhn?blogId=samsjang&logNo=220694855018&categoryNo=66&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

를 참고 하여 이미지를 해석한다

이미지 클리핑

파이썬으로 윈도우 캡쳐

매크로 레코딩 버튼이벤트 좌표

Read text match image

이미지프로세싱 예제 상세함

https://stackoverflow.com/questions/20427759/image-processing-and-extraction-of-characters


이미지처리 관련 링크

As of OpenCV 3.0 (in active dev), you can use the built-in "scene text" object detection module ~
The text detection is built on these two papers:
Once you've found where the text in the scene is, you can run any sort of standard OCR against those slices (Tesseract OCR is common). And there's now an end-to-end sample in opencv using OpenCV's new interface to Tesseract: 






https://tailstar.net/macro/4055447
매크로 제작관련 링크들


tesseract site
https://github.com/tesseract-ocr/tesseract/wiki
https://github.com/tesseract-ocr/tesseract/wiki/Downloads

binary 형태를 받아볼 수 있음, 이러한 이유 <= 빌드가 필요 없음, image를 이용해 training을 해볼 수 있음, image를 이용해 미리 인식 테스트를 해볼 수 있음

exe파일을 받았습니다.
아래 경로 참고

tesseract-ocr-setup-3.02.02.exe

툴의 사용법
setup으로 설치하면 path까지 자동으로 설치됩니다.

D:\Program Files (x86)\Tesseract-OCR\doc 폴더에 테스트용 이미지가 있습니다.
eurotext.tif, phototest.tif

cmd line에서는 아래와 같이 실행하면 됩니다. 첫번째 인자는 이미지가 되고 두번째 인자는 생성되는 파일입니다.

D:\Program Files (x86)\Tesseract-OCR>tesseract doc\eurotext.tif E:/out
Tesseract Open Source OCR Engine v3.02 with Leptonica


여러 언어를 사용할때는 아래와 같이 + 로 연결해서 -l 옵션을 사용하면 됩니다. It can even be used with multiple languages traineddata at a time eg. English and German:   tesseract myscan.png out -l eng+deu Training 아래 링크 참조 https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract 트레이닝은 새로운 언어를 추가하거나 입력되는 인식률을 높이기 위해서 하게됩니다.  위에서 받은 binary가 3.02 라서 다음 링크를 사용해야 합니다. https://github.com/tesseract-ocr/tesseract/wiki/Training-Tesseract-3.00%E2%80%933.02 영어로 된 정확한(동작가능한) 예제를 구하지는 못했습니다. http://blog.secmem.org/489 여기 중간 부분을 보면 training을 어떻게 하면 되는지 정보가 나옵니다. D:\Program Files (x86)\Tesseract-OCR\tesseract-ocr\doc\tesseracticdar2007.pdf 파일을 보면 tesseract 에 대한 원리가 나오는데 읽어봐도 이해하기는 힘드네요.


텐서랙 학습
http://kyubuem.tistory.com/m/53

https://github.com/tesseract-ocr/



댓글