# 기본 출처 : http://kthan.tistory.com/176
# 버젼 최신화로 인해, 위 링크 내용을 토대로 수정됨
설치 Lib
* leptonica 1.74
: http://www.leptonica.com/download.html
:: file << http://www.leptonica.com/source/leptonica-1.74.4.tar.gz
:: latest git << https://github.com/DanBloomberg/leptonica
* tesseract-ocr
: https://github.com/tesseract-ocr/tesseract/wiki/Compiling-%E2%80%93-GitInstallation
* tesser data
* pytesser
: https://code.google.com/archive/p/pytesser/
------------------------------------------------------------------------------------------------------------------------------------------
기본 테스트
아래 테스트 코드로 샘플 검사하는데 제대로 안되길래, 에러 메시지 확인해 보니,
TESSDATA_PREFIX 설정이 필요하다고 해서 아래 명령어로 경로 추가함.
( /usr/local/share/tessdata를 링크걸려고 했으나 용량 때문에 다른 파티션에 추가 했더니.. 링크가 안걸려서..에러 발생 )
------------------------------------------------------------------------------------------------------------------------------------------
ref : http://effbot.org/imagingbook/image.htm
위 PIL 활용해서 인식이 모호한 텍스트 그림 보정 가능
------------------------------------------------------------------------------------------------------------------------------------------
convert 이미지 수정
convert test3image.png -blur 0x3 -level 30%,70% b.png
>> 이건 잘 안먹혀서.. 일단 패쓰~ ( 난중에 다른거에 활요하면 좋을듯..?! )
------------------------------------------------------------------------------------------------------------------------------------------
ref : https://robertgawron.blogspot.kr/2010/11/almost-all-sites-use-images-with-text.html
이 사이트의 함수 활용
$ command arg1 arg2
arg1 : image-file
arg2 : level
------------------------------------------------------------------------------------------------------------------------------------------
PIL 활용하여, BG 및 기타 노이즈 효과 제거 가능
https://stackoverflow.com/questions/24687760/numpy-pil-python-crop-image-on-whitespace-or-crop-text-with-histogram-threshol
'보안 > 기술 정보' 카테고리의 다른 글
Excute BlockChain - Hello World (0) | 2019.01.24 |
---|---|
[보안] SSH tunneling port forwarding (터널링) (0) | 2018.03.07 |
[보안][기술][BurpSuite] 버프슛 사용하는 방법에 대한 세미나 (0) | 2017.06.23 |
[대회/세미나] 갈만한 곳 메모 (0) | 2015.07.29 |
[Backtrack] Maintaining - nc, payload, bind_tcp (0) | 2014.12.03 |