在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):johnoneil/MangaTextDetection开源软件地址(OpenSource Url):https://github.com/johnoneil/MangaTextDetection开源编程语言(OpenSource Language):Python 78.7%开源软件介绍(OpenSource Introduction):MangaTextDetectionExperiments in text localization and detection in raw manga scans. Mostly using OpenCV python API. OverviewThis repository holds some experiments I did in summer 2013 during a sudden interest in text detection in images. It uses some standard techniques (run length smoothing, connected component analysis) and some experimental stuff. Overall, I was able to get in the neighborhood of where I wanted to be, but the results are very processing intensive and not terribly reliable. StateI haven't bothered to form this into a python library. It's just a series of scripts each trying out various things, such as:
Text Location ExampleHere's an example run of a page from Weekly Young Magazine #31 2013. The input image is as follows (jpg). An initial estimate of text locations can be found by the 'LocateText.py' script:
With the results as follows (estimated text marked with red boxes): Note that in the output above you see several of the implementation deficiencies. For example, there are several small false positives scattered around, and some major false positives on the girl's sleeve and eyes in panels 2 and 3. Also note that many large areas of text were not detected (false negatives). Despite how pleased I was with the results (and I was more pleased than you could possibly believe) significant improvements are needed. Text Segmentation ExampleTo more easily separate text from background you can also segment the image, with text areas and non text being separated into different (RGB) color channels. This easily allows you to remove estimated text from image entirely or vice-versa. Use the command:
The results follow: OCR and Html GenerationI did take the time to run simple OCR on some of the located text regions, with mixed results. I used the python tesseract package (pytesser) but found the results were not generally good for vertical text, among other issues. The script ocr.py should run ocr on detected text regions, and output the results to the command line.
You can see some fragmented positives, but in all the results for this page are abysmal. I also embedded those results in an HTML output, allowing "readers" to hover on Japanese Text, revealing the OCR output, which can be edited/copied/pasted. This is via the script MangaDetectText. A (more successful) example of this can be seen below: DependenciesYou should be able to install most of the dependencies via pip, or you could use your operating systems package manager (e.g. Mac OS X http://brew.sh/) Python 2.7+Install as per OS instructions. Piphttp://pip.readthedocs.org/en/latest/index.html Install as per OS instructions. Numpy
Scipyhttp://www.scipy.org/index.html
Matplotlib (contains PyLab)
Pillowhttp://pillow.readthedocs.org/en/latest/
OpenCV
Tesseracthttps://code.google.com/p/tesseract-ocr/ Install as per OS instructions, then use pip to install the python bindings. Don't forget to include your target language's trained data sets.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论