Skip to content

Instantly share code, notes, and snippets.

@Riyasharma-in
Created March 31, 2023 17:19
Show Gist options
  • Save Riyasharma-in/4ded3efb283083e2e4a6c7d8377b4bfc to your computer and use it in GitHub Desktop.
Save Riyasharma-in/4ded3efb283083e2e4a6c7d8377b4bfc to your computer and use it in GitHub Desktop.
Sorting and Automate Adjustment
#adjust_boxes(converted_boxes)
num=0
for i in adjust_boxes(converted_boxes):
image = cv2.rectangle(img, (int(i[0]), int(i[1])), (int(i[2]), int(i[3])), (255,0,255), 1)
cv2.putText(img, "{}".format(num+1), (int(i[0]+30), int(i[1])+30), cv2.FONT_HERSHEY_SIMPLEX , .7,
(0, 0, 255), 2);
num+=1
cv2.imwrite('result.jpg',img)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment