Just My Life & My Work

[iOS] 光學字元識別 (OCR)

光學字元識別 (Optical Character Recognition, OCR),是指對文字資料的圖像檔案進行分析識別處理,取得文字及版面資訊的過程。像是Google Translation App,已經可以透過OCR來即時辨識多國文字!

OCR sample

辨識出來應為1234HappyBoy0

現在iOS有Open source可以使用OCR,而且是Google早在2015年就釋出,若只是辨識簡單的英文字母數字,應該夠用!

下載在GitHub上的Tesseract OCR iOS來試試看吧!

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64. http://www.g8production.com

我稍微測試一下⋯⋯

看起來效果不錯!

不過HappyBoy字體若縮小呢?

就不知道在辨識啥啦XD~看來這個OCR Open Source有些規則必須遵從!

Raywenderlich這麼介紹Tesseract OCR

Tesseract OCR is quite powerful, but does have the following limitations:

  • Unlike some OCR engines (like those used by the U.S. Postal Service to sort mail), Tesseract is unable to recognize handwriting and is limited to about 64 fonts in total.
  • Tesseract requires a bit of preprocessing to improve the OCR results; images need to be scaled appropriately, have as much image contrast as possible, and have horizontally-aligned text.
  • Finally, Tesseract OCR only works on Linux, Windows, and Mac OS X.

參考:WiKi – 光學字元識別Tesseract OCR Tutorial

廣告

隨意留個言吧:)~

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

標籤雲

%d 位部落客按了讚: