Created
March 31, 2023 17:19
-
-
Save Riyasharma-in/4ded3efb283083e2e4a6c7d8377b4bfc to your computer and use it in GitHub Desktop.
Sorting and Automate Adjustment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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