如何检测图像中的文本区域? [英] How to detect text region in image?

查看:267
本文介绍了如何检测图像中的文本区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果提供图片(例如报纸,扫描的报纸,杂志等),如何检测包含文字的区域?我只需要知道该区域并删除它,不需要做文本识别。

Given an image (i.e. newspaper, scanned newspaper, magazine etc), how do I detect the region containing text? I only need to know the region and remove it, don't need to do text recognition.

目的是要删除这些文本区域,以便它将加速我的特征提取过程,因为这些文本区域对我的应用程序没有意义。任何人都知道如何做这个?

The purpose is I want to remove these text areas so that it will speed up my feature extraction procedure as these text areas are meaningless for my application. Anyone know how to do this?

BTW,这将是好的,如果这可以在Matlab中完成!

BTW, it will be good if this can be done in Matlab!

最佳!

p>

推荐答案

您可以使用描边宽度变换(SWT)突出显示文本区域。
使用我的mex实现这里,您可以

You can use Stroke Width Transform (SWT) to highlight text regions. Using my mex implementation posted here, you can

img = imread('http://i.stack.imgur.com/Eyepc.jpg');
[swt swtcc] = SWT( img, 0, 10 );

使用 SWT中边缘图提取和图像过滤的内部参数

Playing with internal parameters of the edge-map extraction and image filtering in SWT.m can help you tweak the resulting mask to your needs.

要得到这个结果:

我在 SWT.m

edgeMap = single( edge( img, 'canny', [0.05 0.25] ) );

这篇关于如何检测图像中的文本区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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