在图像中搜索指定文本
我想我会在这里问一个非常愚蠢的问题。在我当前的项目中,我想提供搜索功能。我有一个大图像教程,其中包含有关某个主题的大量信息,我想搜索图像中的功能。假设使用“Apple”这样的类型,它将显示 Apple 在图像中出现了多少次,单击该图像后,图像滚动并转到出现“Apple”的位置。
感谢您阅读我的愚蠢问题,但如果可能的话请让我知道并提供一些示例代码?
I think I am going to ask very stupid Question here. In my current project i want to give search feature. I have an big image tutorial with lot of information about on a topic and i want to search feature in the image. Suppose use type like "Apple" it will show the Apple occurred how many times in the image and after clicking on of that the image scroll and go to the position where "Apple" is occurred.
Thanks for reading my stupid question but if it is possible let me know and put some sample code??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是我将采用的方法的总体概述:
我想第 2 步将是最困难的。 Tesseract 可能有效,它是基于 C++ 的,但我不知道它有什么依赖项。
更新:GitHub 上有人发布了一个使用 Tesseract 的 演示 iPhone 应用。
Here is a broad overview of the approach I would take:
I imagine step 2 is going to be the most difficult. Tesseract may work, it is C++ based but I don't know what dependencies it has.
UPDATE: Someone on GitHub has posted a demo iPhone App that uses Tesseract.
请尝试使用 WebView 或 Core Text 来呈现您的教程,其中搜索功能几乎是免费的。使用 OCR 进行搜索对于您的需求来说并不实际。
Please try to do use WebView or Core Text to render you tutorial, in which search functionality comes pretty much for free. Use OCR for search is just not practical for your need.