iOS Vuforia:TextReco 增加自己的单词库
2024-09-04 14:39:53
Vuforia的文字识别引擎提供了很好的文字识别功能。引擎依赖于UTF-8字符编码,现支持的字符有A-Z a-z,换行符、空格、单引号、短斜杠。Note:不支持中文及数字。能识别的字体是:serif 和 sans serif 字体,支持的文字样式有平实、加粗、斜体以及下划线。i.e.
详细介绍,查看官网:https://developer.vuforia.com/resources/dev-guide/word-targets
Vuforia默认提供了一个100,000高频英语单词的单词库,但你也可以按照需要添加自己的单词库,添加单词库并加载的步骤如下:(针对iOS平台,在sample TR项目中添加)
1、下载官方提供的单词库格式文件,https://developer.vuforia.com/sites/default/files/AdditionalWords.zip
2、解压将其添加进XCode中,最好和sample 原来的Vuforia-English-word.vwl 保持同一目录下。
3、更新QCARControl.mm 中 loadWordListInBackground() 的代码:
- (void)loadWordListInBackground:(id)obj
{
// Background thread must have its own autorelease pool
@autoreleasepool { ....existing code
// load additional word lists // Add custom words by loading from file
wordList->addWordsFromFile("AdditionalWords.lst", QCAR::WordList::STORAGE_APPRESOURCE); }
else {
error = [[ErrorReport alloc] initWithMessage:"ERROR: failed to load word list"];
}
.... existing code
}
4、build & run.
tips: wordList->addWordsFromFile 方法会返回一个int,表示list中单词数,如果返回是0或者负数,则表示你的list加载失败。
check more:https://developer.vuforia.com/forum/ios/how-add-additional-words-file-text-recognition
最新文章
- 提权GrantPrivilege
- block 在ARC和非ARC下的不同含义
- 使用EasyBCD完美实现Windows7与Linux双系统
- StringBuffer&;StringBuilder区别详解
- unbuntu下安装flash插件
- easy ui 表单提交添加遮罩,避免数据重复提交
- 安装ADT Cannot complete the install because one or more required items could not be found.
- react native mac install
- vim中选择匹配文本删除技巧
- CF 578A A Problem about Polyline
- pearl(二分查找,stl)
- HDU 2255 奔小康赚大钱 KM算法的简单解释
- ant调用shell命令(Ubuntu)
- Java实现读取文章中重复出现的中文字符串
- 最好用的jQuery-Ajax缓存插件
- 关于ESB(企业服务总线)的学习笔记
- webpack打包后的文件
- 【转】实践HTTP206状态:部分内容和范围请求
- Aizu2130-Billion Million Thousand-dp
- require 和 import 区别
热门文章
- win10下vs2015配置Opencv3.1.0过程详解
- 实战录 | 基于openflow协议的抓包分析
- 关于Control flow
- 【kd-tree】bzoj2716 [Violet 3]天使玩偶
- Replace Pioneer 续用2
- 今天开始着手原来Office系统的重构
- 2015年8月18日,杨学明老师《技术部门的绩效管理提升(研讨会)》在中国科学院下属机构CNNIC成功举办!
- Cocos2d-x Application Wizard for Visual Studio User Guide
- VisualSvn server 权限配置
- Nginx学习笔记(四) 源码分析&;socket/UDP/shmem