Skip to content

OpenCV(4.5.2) 👎 error: (-5:Bad argument) in function 'rectangle' #69

@vineeth357

Description

@vineeth357

Objects Detected: bicycle truck dog

Traceback (most recent call last):
File "detect.py", line 201, in
list(map(lambda x: write(x, loaded_ims), output))
File "detect.py", line 201, in
list(map(lambda x: write(x, loaded_ims), output))
File "detect.py", line 193, 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

I am getting this error when I ran the detect.py file for testing. There is some error in the cv2.rectangle().
If anyone knows help me.

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