rogerxavier commited on
Commit
81f2a2c
1 Parent(s): 371ebaa

Update 3mergeDialogToVideo.py

Browse files
Files changed (1) hide show
  1. 3mergeDialogToVideo.py +7 -7
3mergeDialogToVideo.py CHANGED
@@ -261,13 +261,13 @@ def get_sorted_dialog_text(image_path:"包含后缀的文件路径")->"返回排
261
 
262
  # 调用函数并打印结果
263
  associate_text_list,related_groups = find_associate_text(sorted_indices,centers,sorted_coordinates,boxInfo)
264
- print("相关list是",associate_text_list)
265
- print("related_groups是",related_groups)
266
- print("sorted_indices是",sorted_indices)
267
 
268
  related_groups = sort_associate_text_list(sorted_indices,related_groups,boxCoordinates,centers)
269
 
270
- print("组内排序后的related_groups是",related_groups)
271
  #[[3, 4], [7, 5, 6], [10, 9], [11, 12, 13], [15, 16, 14]]
272
 
273
  related_groups_in_sorted_indices = []
@@ -276,7 +276,7 @@ def get_sorted_dialog_text(image_path:"包含后缀的文件路径")->"返回排
276
  for idx in group:
277
  related_groups_in_sorted_indices_item.append(sorted_indices[idx])# 这里加入的是排序后的索引
278
  related_groups_in_sorted_indices.append(related_groups_in_sorted_indices_item)
279
- print("related_groups_in_sorted_indices是",related_groups_in_sorted_indices)
280
  #related_groups_in_sorted_indices->[[7, 6], [3, 2, 4], [9, 10], [11, 13, 12], [15, 16, 14]]->
281
  #期望结果[[0],[3, 2, 4],[1],[5],[7, 6],[8], [9, 10],[11, 13, 12], [15, 16, 14]]
282
 
@@ -284,7 +284,7 @@ def get_sorted_dialog_text(image_path:"包含后缀的文件路径")->"返回排
284
 
285
 
286
  related_groups = sort_dialog_list(sorted_indices,related_groups,sorted_coordinates)
287
- print("related_groups组件排序后是:",related_groups)
288
 
289
 
290
 
@@ -303,7 +303,7 @@ def get_sorted_dialog_text(image_path:"包含后缀的文件路径")->"返回排
303
  sorted_text.append(boxInfo['Text'][str(sorted_indices[i])])
304
  added_indices.add(i)
305
 
306
- print("不完整的sorted_text是",sorted_text)
307
 
308
 
309
  # 不用在最后一个项末尾添加"\n",从而隔开其他的漫画块对话(因为总会有最后一个子块,因而上述方式就可以加上了)
 
261
 
262
  # 调用函数并打印结果
263
  associate_text_list,related_groups = find_associate_text(sorted_indices,centers,sorted_coordinates,boxInfo)
264
+ #print("相关list是",associate_text_list)
265
+ #print("related_groups是",related_groups)
266
+ #print("sorted_indices是",sorted_indices)
267
 
268
  related_groups = sort_associate_text_list(sorted_indices,related_groups,boxCoordinates,centers)
269
 
270
+ #print("组内排序后的related_groups是",related_groups)
271
  #[[3, 4], [7, 5, 6], [10, 9], [11, 12, 13], [15, 16, 14]]
272
 
273
  related_groups_in_sorted_indices = []
 
276
  for idx in group:
277
  related_groups_in_sorted_indices_item.append(sorted_indices[idx])# 这里加入的是排序后的索引
278
  related_groups_in_sorted_indices.append(related_groups_in_sorted_indices_item)
279
+ #print("related_groups_in_sorted_indices是",related_groups_in_sorted_indices)
280
  #related_groups_in_sorted_indices->[[7, 6], [3, 2, 4], [9, 10], [11, 13, 12], [15, 16, 14]]->
281
  #期望结果[[0],[3, 2, 4],[1],[5],[7, 6],[8], [9, 10],[11, 13, 12], [15, 16, 14]]
282
 
 
284
 
285
 
286
  related_groups = sort_dialog_list(sorted_indices,related_groups,sorted_coordinates)
287
+ #print("related_groups组件排序后是:",related_groups)
288
 
289
 
290
 
 
303
  sorted_text.append(boxInfo['Text'][str(sorted_indices[i])])
304
  added_indices.add(i)
305
 
306
+ #print("不完整的sorted_text是",sorted_text)
307
 
308
 
309
  # 不用在最后一个项末尾添加"\n",从而隔开其他的漫画块对话(因为总会有最后一个子块,因而上述方式就可以加上了)