Skip to content

Help!!!cv2.error: OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function 'rectangle' #151

@Zxl1556180489

Description

@Zxl1556180489

Traceback (most recent call last):
File "/home/zxl/PycharmProjects/wjchaoGit/pytorch-yolo-v3-master(usbcam)/pytorch-yolo-v3-master/cam_demo.py", line 151, in
list(map(lambda x: write(x, orig_im), output))
File "/home/zxl/PycharmProjects/wjchaoGit/pytorch-yolo-v3-master(usbcam)/pytorch-yolo-v3-master/cam_demo.py", line 151, in
list(map(lambda x: write(x, orig_im), output))
File "/home/zxl/PycharmProjects/wjchaoGit/pytorch-yolo-v3-master(usbcam)/pytorch-yolo-v3-master/cam_demo.py", line 49, in write
cv2.rectangle(img, c1, c2, color, 1)
cv2.error: OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function 'rectangle'

Overload resolution failed:

  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'pt1'. Sequence item with index 0 has a wrong type
  • Can't parse 'rec'. Expected sequence length 4, got 2
  • Can't parse 'rec'. Expected sequence length 4, got 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions