Matlab-vision包学习-Object Detection and Recognition-ocr函数字符识别
来源:互联网 发布:诲汝知之乎的意思 编辑:程序博客网 时间:2024/06/08 07:06
这一篇介绍利用
函数/Functions
函数名称:ocr
功能:利用光学性质识别文字
语法:txt = ocr(I);
txt = ocr(I,roi);
[_] = ocr(_,Name,Value);
其中,I为图像;roi为感兴趣的区域;Name为用一对单引号包含的字符串,Value为对应Name的值。
txt = ocr(img,'Language',{'path\...\eng.traineddata','path\...\chinese.traineddata'}),注意每个<language>.traineddata的路径必须相同,否则无效。’CharacterSet'默认值为 all characters,也可以是字符串,例如只识别数字时,可以取值为'0 1 2 3 4 5 6 7 8 9'(包含空格)
举例:
close all; clear all; clc; businessCard = imread('businessCard.png'); ocrResults = ocr(businessCard); recognizedText = ocrResults.Text; figure; imshow(businessCard); text(600,150,recognizedText,'BackgroundColor',[1,1,1]); title('识别英语和数字'); businessCard = imread('businessCard.png'); ocrResults = ocr(businessCard,'CharacterSet','0 1 2 3 4 5 6 7 8 9'); recognizedText = ocrResults.Text; figure; imshow(businessCard); text(600,150,recognizedText,'BackgroundColor',[1,1,1]); title('识别数字'); businessCard = imread('C:\Users\heshiwen\Desktop\digital.png'); ocrResults = ocr(businessCard,'CharacterSet','0 1 2 3 4 5 6 7 8 9'); recognizedText = ocrResults.Text; figure; imshow(businessCard); text(600,150,recognizedText,'BackgroundColor',[1,1,1]); title('识别数字');
0 0
- Matlab-vision包学习-Object Detection and Recognition-ocr函数字符识别
- Matlab-vision包学习-Object Detection and Recognition-物体识别方法中级联分类器训练
- Matlab-vision包学习-Object Detection and Recognition-标记正例
- Matlab-vision包学习-Feature Detection,Extraction and Matching-匹配
- Matlab-vision包学习-Feature Detection,Extraction and Matching-显示匹配结果的函数
- 基于ROS 目标检测与识别-Object Detection and Recognition
- Matlab-vision包学习-Feature Detection,Extraction and Matching-BRISK角点检测
- Matlab-vision包学习-Feature Detection,Extraction and Matching-FAST角点检测
- Matlab-vision包学习-Feature Detection,Extraction and Matching-Harris角点检测
- Matlab-vision包学习-Feature Detection,Extraction and Matching-最小特征值角点检测
- Matlab-vision包学习-Feature Detection,Extraction and Matching-MSER特征提取
- Matlab-vision包学习-Feature Detection,Extraction and Matching-SURF检测blob
- Matlab-vision包学习-Feature Detection,Extraction and Matching-提取描述子
- Matlab-vision包学习-Feature Detection,Extraction and Matching-提取HOG描述子
- Matlab-vision包学习-Image Registration and Geometric Transformation
- [深度学习论文笔记][Object Localization] OverFeat: Integrated Recognition, Localization and Detection using C
- 关于OCR(Optical Character Recognition,光学字符识别)
- 光学字符识别(OCR,Optical Character Recognition)
- 【第4周 项目5 - 猴子选大王】
- 实现android gif图片动画播放功能
- 快速选择
- xXx时间屏保
- 数据结构实践——猴子选大王
- Matlab-vision包学习-Object Detection and Recognition-ocr函数字符识别
- 开始学Java,
- pom.xml解析
- 第四周项目3-单链表的应用逆置
- 贪心算法(算法分析与设计)
- 第4周 项目3 - 单链表应用(2)
- 想开网店?向你推荐最好的开源电子商务平台
- [237]Delete Node in a Linked List
- apt的引用