기계는 거짓말하지 않는다

Python OpenCV Error Sequence item with index 0 has a wrong type 본문

Python

Python OpenCV Error Sequence item with index 0 has a wrong type

KillinTime 2021. 7. 31. 15:39

Python의 openCV를 사용할 때, 원, 사각형 등 이미지에 무엇인가를 나타내면 이런 오류를 보는 경우가 있다.

 

OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function 'rectangle'

> Overload resolution failed:

>  - Can't parse 'pt1'. Sequence item with index 0 has a wrong type

...

 

point는 정수가 되어야 하고 이럴 경우 매개변수에 float 형식이 들어갈 수 있으므로 타입을 꼭 확인한다.

'Python' 카테고리의 다른 글

Python ValueError: invalid literal for int() with base 10  (0) 2021.08.02
Python OpenCV 웹캠 실시간 읽기  (0) 2021.07.31
Python glob module  (0) 2021.07.29
Python os module  (0) 2021.07.29
Python zip 함수  (0) 2021.07.25
Comments