如何突出显示图像中的单词?

发布于 2024-09-24 03:25:00 字数 253 浏览 1 评论 0原文

我希望能够在用户搜索文档图像中的某个单词时突出显示该单词。就像 Google 图书一样 此处

据我所知,Tesseract和其他开源OCR程序不支持这种功能,所以有人知道如何完成它吗?

I'd like to be able to highlight a word in an image of a document when the user searches for that word. Exactly like Google Books does
here.

As far as I know, Tesseract and other open source OCR programs don't support this sort of function, so does anyone have any ideas how it might be done?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

無心 2024-10-01 03:25:00

Yes they "support" it. Sort of.

They give you a rectangle that tells you where the word is. Using that, fill said rectangle with the color of your choice on the image using a color blending mode (e.g., keep the luma intact and just alter the chroma). This works well with B/W and grayscale images, which most books are, and is sufficient for most colored fonts too (except those in a colored background). A solution to this is to invert the colors instead of highlighting them, this is done in many applications (Foxit Reader comes to mind).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文