基于视觉的屏幕阅读器稳健框架
1. 网页分割算法
网页分割算法是整个系统的重要基础,它接受渲染后的网页图像作为输入,输出网页中未标记区域的分割树。以下是具体的算法:
Algorithm 2. Algorithm for producing a segmentation tree of a page image.
1 Function Segment(T)
Input: Segmentation tree T = (V, E)
Output: Segmentation tree T ′ = (V ′, E′)
2
foreach v ∈V such that v is a leaf node do
3
Sh ←vimg ∗Kh ;
4
Sv ←vimg ∗Kv ;
5
Eh(x, y) ←
1 Sh(x, y) ≥t
0 Sh(x, y) < t ;
6
Ev(x, y) ←
1 Sv(x, y) ≥t
0 Sv(x, y) < t ;
7
bh(y) ←∑
x Eh(x, y) ;
8
bv(x) ←∑
y Ev(x, y) ;
9
Let X represent the set of strong peaks in bv and Y represent the set of
strong peaks in bh ;
10
if X ∪Y ̸= ∅then
11
Find a set R of rectangular regions with edges corresponding to
candidate boundaries in X and Y such that C(R) is minimized
超级会员免费看
订阅专栏 解锁全文
1216

被折叠的 条评论
为什么被折叠?



