在图像中查找文本边界 [英] Find text boundaries in image

查看:115
本文介绍了在图像中查找文本边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣在图像中找到文本边界(不是字符识别,只是查找文本):

I'm interested in finding text boundaries in an image (not character recognition, just locating the text):

给定一些带有图形和文本的JPEG图像,< br>
如果用户点击文本,应用程序会自动缩放它,

但是为此我需要找到文本边界...

有什么想法吗?

Given some JPEG image with graphics and text,
if the user clicks over the text the application will automatically zoom it,
But for that I need to find the text boundaries...
Any ideas?

推荐答案

在没有看到图像的情况下,很难想到一种强大的方法,这种方式在大多数情况下都有效。这是我的建议(我假设您知道文本的颜色以及文本颜色在图像中很少见):

Without seeing the images, it is difficult to think of a robust way, that will work in most cases. Here is my suggestion (I assume that you know the colour(s) of the text and that the text colour(s) is rare in the image):


  1. 过滤图像:计算RGB或HSV空间中的欧几里德距离

  2. 聚类峰值:查看峰值,如果它们靠近在一起,它们可能属于同一个峰值文本。

  3. 计算群集周围的边界框。

我希望这能让你开始。

这篇关于在图像中查找文本边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆