Skip to content

Commit be156ba

Browse files
author
dang-xia
committed
字切分
1 parent d3bc60e commit be156ba

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,87 @@
107107
}]
108108
```
109109
可参考文件samples目录中的文件1_output_json.txt。
110+
111+
------
112+
113+
# 字切分
114+
这一步将版面切分输出的区域进一步切分到单个字。
115+
## 输入
116+
一张藏经图片和版面划分输出的某个区域的json描述,例如图片为样本中的1.jpg,区域的json描述为:
117+
```json
118+
{
119+
"text": "怛姪他",
120+
"left": 21,
121+
"right": 71,
122+
"top": 1,
123+
"bottom": 50,
124+
"line_no": 19,
125+
"region_no": 1,
126+
"page_bar_no": "P1L3/3"
127+
}
128+
```
129+
## 输出
130+
输出一个json格式的数组,表示每个字的图片区域的坐标及相关的信息,其中对应每一个字的图片区域,包含这些字段:
131+
- char,表示汉字;
132+
- left,左边界坐标;
133+
- right,右边界坐标;
134+
- top,上边界坐标;
135+
- bottom,下边界坐标;
136+
- mark,与输入的区域的json描述中相应的字段相同,如输入的区域的json描述中无此字段,则忽略;
137+
- line_no,与输入的区域的json描述中相应的字段相同;
138+
- region_no,与输入的区域的json描述中相应的字段相同;
139+
- page_bar_no,与输入的区域的json描述中相应的字段相同。
140+
请参考(坐标值非实际数值):
141+
```json
142+
[{
143+
"char": "",
144+
"left": 21,
145+
"right": 71,
146+
"top": 1,
147+
"bottom": 50,
148+
"mark": "<",
149+
"line_no": 19,
150+
"region_no": 1,
151+
"page_bar_no": "P1L3/3"
152+
}, {
153+
"char": "",
154+
"left": 21,
155+
"right": 71,
156+
"top": 1,
157+
"bottom": 50,
158+
"mark": "<",
159+
"line_no": 19,
160+
"region_no": 1,
161+
"page_bar_no": "P1L3/3"
162+
}, {
163+
"char": "",
164+
"left": 21,
165+
"right": 71,
166+
"top": 1,
167+
"bottom": 50,
168+
"mark": "<",
169+
"line_no": 19,
170+
"region_no": 1,
171+
"page_bar_no": "P1L3/3"
172+
}, {
173+
"char": "",
174+
"left": 21,
175+
"right": 71,
176+
"top": 1,
177+
"bottom": 50,
178+
"mark": "<",
179+
"line_no": 19,
180+
"region_no": 1,
181+
"page_bar_no": "P1L3/3"
182+
}, {
183+
"char": "",
184+
"left": 21,
185+
"right": 71,
186+
"top": 1,
187+
"bottom": 50,
188+
"mark": "<",
189+
"line_no": 19,
190+
"region_no": 1,
191+
"page_bar_no": "P1L3/3"
192+
}]
193+
```

0 commit comments

Comments
 (0)