Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cv2.error #6

Open
iason-r opened this issue Jan 15, 2025 · 0 comments
Open

cv2.error #6

iason-r opened this issue Jan 15, 2025 · 0 comments

Comments

@iason-r
Copy link

iason-r commented Jan 15, 2025

When I run the Kitti dataset, some frames will error as follows:

Traceback (most recent call last):
  File "E:\gsloam\Tools_Merge_Image_PointCloud\main.py", line 101, in <module>
    main()
  File "E:\gsloam\Tools_Merge_Image_PointCloud\main.py", line 72, in main
    cv2.rectangle(pcimg, (int(i[0]-1),int(i[1]-1)), (int(i[0]+1),int(i[1]+1)), (0, 0, color), -1)
cv2.error: OpenCV(4.10.0) :-1: 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 found through debugging that this issue seems to be caused by the conversion of points in the point cloud to the image coordinate system, where the coordinates are too large or negative.
I would greatly appreciate it if you could help me answer this question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant