使用 ImageMagick、OCR、JavaScript 将带标签的图像 (EPS) 转换为交互式网页
业务洞察力: 我们处于教育领域,我们需要将标记图像(EPS)自动转换为交互式练习 (使用 HTML/SVG/JavaScript),由学生使用。
技术洞察力: 分层 EPS 文件是我们从出版商处获得的。 EPS 文件应转换为两个 PNG 文件: [1.png] 仅包含标签文本 [2.png] 除标签文本外的所有其他内容。
然后[1.png]应该通过一些高级OCR(?)程序运行,该程序应该输出标签文本及其在图像中的位置(X,Y坐标)。然后,可以使用 HTML/JavaScript 将标签文本覆盖在 [2.png] 上,并进行一些交互,例如使用 JavaScript 进行拖放。
到目前为止尝试过: 手动将EPS转换为PNG并使用ImageMagick和Tessaract OCR单独获取标签文本。
问题: 上述图像处理要求(EPS->PNG+带坐标的文本标签)可以自动化到什么程度?可以使用哪些最佳工具?提前感谢您的帮助。
PS:我是一名 UI 开发人员,只要为标签提供坐标,就可以处理 HTML/JavaScript 部分。
Business Insight:
We are in education domain and we have a requirement to automate the conversion of labeled images (EPS), into interactive exercises
(using HTML/SVG/JavaScript), used by students.
Technical Insight:
Layered EPS files is what we get from the pubishers. The EPS files should be converted into two PNG files: [1.png] Which has label texts only [2.png] Everything else but label texts.
Then [1.png] should be run through some advanced OCR (?) program that should output the label texts along with their positions (X,Y coords) in the image. Then HTML/JavaScript could be used to overlay the label texts over the [2.png] along with some interactions like Drag'n'drop using JavaScript.
Tried so far:
Manually converted the EPS into PNG and used ImageMagick and Tessaract OCR to get the label text alone.
Question:
How far the above requirements of image processing (EPS->PNG+text labels with coords) could be automated and what are the best tools that could be used? Appreciate the help in advance.
PS: I'm an UI developer and could handle the HTML/JavaScript part, if just the coords are provided for the labels.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论