File tree Expand file tree Collapse file tree 1 file changed +84
-0
lines changed
Expand file tree Collapse file tree 1 file changed +84
-0
lines changed Original file line number Diff line number Diff line change 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+ ```
You can’t perform that action at this time.
0 commit comments