Skip to content

Commit 2619ec5

Browse files
committed
Draw box around objects
1 parent 51143b1 commit 2619ec5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

examples/image/classify.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def main(argv):
108108
print('Found %d bounding boxes (%d ms.)' % (len(res["result"]["bounding_boxes"]), res['timing']['dsp'] + res['timing']['classification']))
109109
for bb in res["result"]["bounding_boxes"]:
110110
print('\t%s (%.2f): x=%d y=%d w=%d h=%d' % (bb['label'], bb['value'], bb['x'], bb['y'], bb['width'], bb['height']))
111+
img = cv2.rectangle(img, (bb['x'], bb['y']), (bb['x'] + bb['width'], bb['y'] + bb['height']), (255, 0, 0), 1)
111112

112113
if (show_camera):
113114
cv2.imshow('edgeimpulse', img)

0 commit comments

Comments
 (0)