BakingBrains / Real-Time_Background_remover

Using OpenCV and CVzone
40 stars 12 forks source link

cv2.error: OpenCV(4.8.0) :-1: error: (-5:Bad argument) in function 'resize' #3

Open jiapei100 opened 11 months ago

jiapei100 commented 11 months ago

It looks cvzone.stackImages takes a gray image ONLY. But your code clearly conflicts again 1 channel ?? Not quite sure if I'm correct...

Exception has occurred: error
OpenCV(4.8.0) :-1: error: (-5:Bad argument) in function 'resize'
> Overload resolution failed:
>  - src data type = 17 is not supported
>  - Expected Ptr<cv::UMat> for argument 'src'
  File "....../Real-Time_Background_remover/BackgroundRemover.py", line 29, in <module>
    imgStack = cvzone.stackImages([img, imgOut], 2,1)
cv2.error: OpenCV(4.8.0) :-1: error: (-5:Bad argument) in function 'resize'
> Overload resolution failed:
>  - src data type = 17 is not supported
>  - Expected Ptr<cv::UMat> for argument 'src'