资源简介
利用opencv的简易Python文字识别demo,可能有点小问题,随后会优化

代码片段和文件信息
from simpleocr.files import open_img
from simpleocr.segmentation import ContourSegmenter
from simpleocr.feature_extraction import SimpleFeatureExtractor
from simpleocr.classification import KNNClassifier
from simpleocr.ocr import OCR accuracy show_differences
segmenter = ContourSegmenter(blur_y=5 blur_x=5 block_size=11 c=10)
extractor = SimpleFeatureExtractor(feature_size=10 stretch=False)
classifier = KNNClassifier()
ocr = OCR(segmenter extractor classifier)
ocr.train(open_img(‘digits1‘))
test_image = open_img(‘digits2‘)
test_chars test_classes test_segments = ocr.ocr(test_image show_steps=True)
print(“accuracy:“ accuracy(test_image.ground.classes test_classes))
print(“OCRed text:\n“ test_chars)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-09-16 14:51 simple-ocr-opencv-master\
文件 1174 2017-09-16 14:51 simple-ocr-opencv-master\.gitignore
文件 272 2017-09-16 14:51 simple-ocr-opencv-master\.travis.yml
文件 29 2017-09-16 14:51 simple-ocr-opencv-master\AUTHORS
文件 34520 2017-09-16 14:51 simple-ocr-opencv-master\LICENSE
文件 85 2017-09-16 14:51 simple-ocr-opencv-master\MANIFEST.in
文件 3205 2017-09-16 14:51 simple-ocr-opencv-master\README.md
文件 724 2017-09-16 14:51 simple-ocr-opencv-master\example.py
文件 387 2017-09-16 14:51 simple-ocr-opencv-master\example_grounding.py
文件 776 2017-09-16 14:51 simple-ocr-opencv-master\setup.py
目录 0 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\
文件 2171 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\__init__.py
文件 2902 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\classification.py
目录 0 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\data\
文件 2176 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\data\digits1.box
文件 147997 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\data\digits1.png
文件 3931 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\data\digits2.box
文件 310624 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\data\digits2.png
文件 814 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\data\unicode1.box
文件 15501 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\data\unicode1.png
文件 1736 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\feature_extraction.py
文件 3081 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\files.py
文件 4250 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\grounding.py
文件 2904 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\improver.py
文件 2172 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\numpy_utils.py
文件 3975 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\ocr.py
文件 4147 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\opencv_utils.py
文件 5896 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\processor.py
文件 3406 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\segmentation.py
文件 5552 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\segmentation_aux.py
文件 3204 2017-09-16 14:51 simple-ocr-opencv-master\simpleocr\segmentation_filters.py
............此处省略7个文件信息
- 上一篇:寻路.py
- 下一篇:python27_d.lib
相关资源
- Instant Pygame for Python Game Development How
- Biopython Tutorial
- Think Python 2nd
- 一个小小的表白程序(python)
- Python课堂笔记(高淇400集第一季)
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
评论
共有 条评论