C++ opencv and region growing to extract the table

55 篇文章 0 订阅
50 篇文章 1 订阅

1、理论基础

区域生长算法的基本思想是将有相似性质的像素点合并到一起。对每一个区域要先指定一个种子点作为生长的起点,然后将种子点周围领域的像素点和种子点进行对比,将具有相似性质的点合并起来继续向外生长,直到没有满足条件的像素被包括进来为止。这样一个区域的生长就完成了。这个过程中有几个关键的问题:

a> 给定种子点(种子点如何选取?)

种子点的选取很多时候都采用人工交互的方法实现,也有用其他方式的,比如寻找物体并提取物体内部点作为种子点。

b> 确定在生长过程中能将相邻像素包括进来的准则

灰度图像的差值;彩色图像的颜色等等。都是关于像素与像素间的关系描述。

c> 生长的停止条件

  • 1. Theoretical basis

    The basic idea of region growth algorithm is to combine pixels with similar properties.For each region, a seed point should be designated as the starting point of growth, and then the pixels in the fields around the seed point should be compared with the seed points, and the similarity points should be combined to continue outward growth until no pixels meeting the conditions are included.The growth of such an area is complete.There are several key issues in this process:

    A > given seed points (how to select seed points?)

    In many cases, the selection of seed points is realized by means of human interaction, and other methods are also useful, such as looking for objects and extracting points inside objects as seed points.

    B > determines the criteria for including adjacent pixels in the growth process

    The difference of grayscale image;The color of the color image and so on.They are all about the relationship between pixels.

    C stop conditions for > growth

2、灰度差值的区域生长算法实现

算法实现的步骤:

a>  创建一个空白的图像(全黑);

b> 将种子点存入vector中,vector中存储待生长的种子点;

c> 依次弹出种子点并判断种子点如周围8领域的关系(生长规则),相似的点则作为下次生长的种子点;

d> vector中不存在种子点后就停止生长。

  • 2. Implementation of the region growth algorithm for gray difference value

    Steps of algorithm implementation:

    A > creates a blank image (all black);

    B > stores seed points in vector, in which seeds to be grown are stored;

    C > pops the seed points successively and judges the relationship between the seed points such as the surrounding 8 fields (growth rules). Similar points are taken as the seed points for the next growth.

    D > vector stops growing after there is no seed point.

 input:

 Output:

通过局部区域生长实现非标准表格识别,代码暂时不公开。

  • Non-standard table recognition is realized through local area growth, the code is temporarily not disclosed.

  I hope I can help you,If you have any questions, please  comment on this blog or send me a private message. I will reply in my free time.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值