問題描述
誰能描述我如何在 python 中使用 opencv 或 simplecv 實現(xiàn) SWT?
Can anyone describe how can i implement SWT in python using opencv or simplecv ?
推薦答案
好的,就這樣吧:
底部有代碼下載鏈接的實現(xiàn)細節(jié)鏈接:SWT
The link that has details on the implementation with the code download link at the bottom: SWT
為了完整起見,還提到 SWT 或 Stroke Width Transform 是 Epshtein 和其他人在 2010 年設(shè)計的,并且已證明是迄今為止最成功的文本檢測方法之一.它不使用機器學習或復(fù)雜的測試.基本上在對輸入圖像進行 Canny 邊緣檢測之后,它會計算構(gòu)成圖像中對象的每個筆劃的粗細.由于文本的筆畫粗細一致,這可能是一種強大的識別功能.
For the sake of completeness, also mentioning that SWT or Stroke Width Transform was devised by Epshtein and others in 2010 and has turned out to be one of the most successful text detection methods til date. It does not use machine learning or elaborate tests. Basically after Canny edge detection on the input image, it calculates the thickness of each stroke that makes up objects in the image. As text has uniformly thick strokes, this can be a robust identifying feature.
鏈接中給出的實現(xiàn)是使用 C++、OpenCV 和 Boost 庫,它們用于連接圖遍歷等.計算 SWT 步驟.我個人已經(jīng)在 Ubuntu 上對其進行了測試,它工作得很好(而且效率很高),盡管準確度并不準確.
The implementation given in the link is using C++, OpenCV and the Boost library they use for the connected graph traversals etc. after the SWT step is computed. Personally I've tested it on Ubuntu and it works quite well (and efficiently), though the accuracy is not exact.
這篇關(guān)于筆畫寬度變換 (SWT) 實現(xiàn) (Python)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!