I was trying to draw some rectangles within an image but the system gave me this error:
Here is my code:
cv2.rectangle(img=sample,
pt1=(box[0], box[1]),
pt2=(box[2], box[3]),
color=(220, 0, 0), thickness=2)
Any advice will be appreciated!
PS: I tried this piece of codes on kaggle notebok and it ran successfully but it crashed when I want to apply streamlit to deploy a web app (using my local machine). Not sure if it makes a difference, just FYI.
I figured out this issue, it is about the version. When I downgraded to 4.1.0.25, problem is solved.