Open abdelDebug opened 7 years ago
@abdelDebug could you figure out already?
@idefix92 Not Yet !
@abdelDebug I figured out:
I modified the draw boxes to print them by:
def draw_boxes(im, bboxes, is_display=True, color=None, caption="Image", wait=True):
"""
boxes: bounding boxes
"""
im=im.copy()
bbox_list = []
for box in bboxes:
if color==None:
if len(box)==5 or len(box)==9:
c=tuple(cm.jet([box[-1]])[0, 2::-1]*255)
else:
c=tuple(np.random.randint(0, 256, 3))
else:
c=color
first_point = tuple(box[:2])
second_point = tuple(box[2:4])
cv2.rectangle(im, first_point, second_point, c)
bbox_list.append((first_point, second_point))
if is_display:
cv2.imshow(caption, im)
if wait:
cv2.waitKey(0)
return im, bbox_list
@abdelDebug they are stored in the text_proposal_connector:
text_lines[index, 0]=x0 text_lines[index, 1]=min(lt_y, rt_y) text_lines[index, 2]=x1 text_lines[index, 3]=max(lb_y, rb_y) text_lines[index, 4]=score
@idefix92 Could you give me please the whole python script. Thank you in advance
Could you please tell me how can I determine the bounding boxes coordinates ??